mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Ensure _.toString produces the correct result for Object(-0).
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -19440,10 +19440,16 @@
|
||||
});
|
||||
|
||||
QUnit.test('should preserve sign of `0`', function(assert) {
|
||||
assert.expect(2);
|
||||
assert.expect(1);
|
||||
|
||||
assert.strictEqual(_.toString(0), '0');
|
||||
assert.strictEqual(_.toString(-0), '-0');
|
||||
var values = [0, Object(0), -0, Object(-0)],
|
||||
expected = ['0', '0', '-0', '-0'];
|
||||
|
||||
var actual = lodashStable.map(values, function(value) {
|
||||
return _.toString(value);
|
||||
});
|
||||
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
QUnit.test('should return the `toString` result of the wrapped value', function(assert) {
|
||||
|
||||
Reference in New Issue
Block a user