mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Simplify NaN checks in tests.
This commit is contained in:
@@ -885,7 +885,7 @@
|
||||
unwrapped = wrapped.value();
|
||||
|
||||
return wrapped instanceof _ &&
|
||||
(unwrapped === value || (_.isNaN(unwrapped) && _.isNaN(value)));
|
||||
(unwrapped === value || (unwrapped !== unwrapped && value !== value));
|
||||
});
|
||||
|
||||
assert.deepEqual(actual, expected);
|
||||
@@ -2774,7 +2774,7 @@
|
||||
var constant = index ? _.constant(value) : _.constant(),
|
||||
result = constant();
|
||||
|
||||
return result === value || (_.isNaN(result) && _.isNaN(value));
|
||||
return result === value || (result !== result && value !== value);
|
||||
});
|
||||
|
||||
assert.deepEqual(actual, expected);
|
||||
|
||||
Reference in New Issue
Block a user