mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Add _.uniq unit test.
Former-commit-id: 29a09711863011681a45ae800502eca9a7022799
This commit is contained in:
13
test/test.js
13
test/test.js
@@ -355,7 +355,7 @@
|
||||
equal(_.every([true, null, true], _.identity), false);
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.extend');
|
||||
@@ -785,14 +785,14 @@
|
||||
equal(_.isFinite(' '), false);
|
||||
equal(_.isFinite('2px'), false);
|
||||
});
|
||||
|
||||
|
||||
test('should return `true` for numeric string values', function() {
|
||||
equal(_.isFinite('2'), true);
|
||||
equal(_.isFinite('0'), true);
|
||||
equal(_.isFinite('08'), true);
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.isObject');
|
||||
@@ -1754,6 +1754,13 @@
|
||||
|
||||
deepEqual(actual, [1, 2, 3]);
|
||||
});
|
||||
|
||||
test('should distinguish between numbers and numeric strings', function() {
|
||||
var expected = ['2', 2, Object('2'), Object(2)],
|
||||
actual = _.uniq(expected);
|
||||
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user