mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Enhance createRound by using toNumber to allow binary and octal strings.
This commit is contained in:
committed by
John-David Dalton
parent
ec8ccbcc55
commit
3eda8e64f3
12
test/test.js
12
test/test.js
@@ -16130,7 +16130,19 @@
|
||||
|
||||
actual = func('5e1e1', 1);
|
||||
assert.deepEqual(actual, NaN);
|
||||
});
|
||||
|
||||
QUnit.test('`_.' + methodName + '` should preserve sign of `0`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var values = [[0], [-0], ['0'], ['-0'], [0, 1], [-0, 1], ['0', 1], ['-0', 1]],
|
||||
expected = [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity];
|
||||
|
||||
var actual = lodashStable.map(values, function(args) {
|
||||
return 1 / func.apply(undefined, args);
|
||||
});
|
||||
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user