mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add _.toInteger test for negative floats.
This commit is contained in:
@@ -18491,8 +18491,9 @@
|
||||
|
||||
(function() {
|
||||
QUnit.test('should convert values to integers', function(assert) {
|
||||
assert.expect(5);
|
||||
assert.expect(6);
|
||||
|
||||
assert.strictEqual(_.toInteger(-5.6), -5);
|
||||
assert.strictEqual(_.toInteger('3.14'), 3);
|
||||
assert.strictEqual(_.toInteger(), 0);
|
||||
assert.strictEqual(_.toInteger(NaN), 0);
|
||||
|
||||
Reference in New Issue
Block a user