mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Remove legacy filePath resolving code.
This commit is contained in:
16
test/test.js
16
test/test.js
@@ -54,13 +54,12 @@
|
|||||||
Map = root.Map,
|
Map = root.Map,
|
||||||
noop = function() {},
|
noop = function() {},
|
||||||
objToString = objectProto.toString,
|
objToString = objectProto.toString,
|
||||||
params = root.arguments,
|
params = argv,
|
||||||
push = arrayProto.push,
|
push = arrayProto.push,
|
||||||
realm = {},
|
realm = {},
|
||||||
Set = root.Set,
|
Set = root.Set,
|
||||||
slice = arrayProto.slice,
|
slice = arrayProto.slice,
|
||||||
Symbol = root.Symbol,
|
Symbol = root.Symbol,
|
||||||
system = root.system,
|
|
||||||
Uint8Array = root.Uint8Array,
|
Uint8Array = root.Uint8Array,
|
||||||
WeakMap = root.WeakMap;
|
WeakMap = root.WeakMap;
|
||||||
|
|
||||||
@@ -82,19 +81,12 @@
|
|||||||
|
|
||||||
/** The file path of the lodash file to test. */
|
/** The file path of the lodash file to test. */
|
||||||
var filePath = (function() {
|
var filePath = (function() {
|
||||||
var min = 0,
|
var min = 2,
|
||||||
result = [];
|
result = params || [];
|
||||||
|
|
||||||
if (phantom) {
|
if (phantom) {
|
||||||
|
min = 0;
|
||||||
result = params = phantom.args || require('system').args;
|
result = params = phantom.args || require('system').args;
|
||||||
} else if (system) {
|
|
||||||
min = 1;
|
|
||||||
result = params = system.args;
|
|
||||||
} else if (argv) {
|
|
||||||
min = 2;
|
|
||||||
result = params = argv;
|
|
||||||
} else if (params) {
|
|
||||||
result = params;
|
|
||||||
}
|
}
|
||||||
var last = result[result.length - 1];
|
var last = result[result.length - 1];
|
||||||
result = (result.length > min && !/test(?:\.js)?$/.test(last)) ? last : '../lodash.js';
|
result = (result.length > min && !/test(?:\.js)?$/.test(last)) ? last : '../lodash.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user