mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Cleanup n to integer tests.
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -4063,7 +4063,7 @@
|
||||
QUnit.test('should coerce `n` to an integer', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
assert.deepEqual(_.drop(array, 1.2), [2, 3]);
|
||||
assert.deepEqual(_.drop(array, 1.6), [2, 3]);
|
||||
});
|
||||
|
||||
QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
|
||||
@@ -4151,7 +4151,7 @@
|
||||
QUnit.test('should coerce `n` to an integer', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
assert.deepEqual(_.dropRight(array, 1.2), [1, 2]);
|
||||
assert.deepEqual(_.dropRight(array, 1.6), [1, 2]);
|
||||
});
|
||||
|
||||
QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
|
||||
@@ -15560,11 +15560,12 @@
|
||||
assert.strictEqual(_.repeat('abc', -2), '');
|
||||
});
|
||||
|
||||
QUnit.test('should coerce `n` to a number', function(assert) {
|
||||
assert.expect(3);
|
||||
QUnit.test('should coerce `n` to an integer', function(assert) {
|
||||
assert.expect(4);
|
||||
|
||||
assert.strictEqual(_.repeat('abc'), '');
|
||||
assert.strictEqual(_.repeat('abc', '2'), 'abcabc');
|
||||
assert.strictEqual(_.repeat('abc', 2.6), 'abcabc');
|
||||
assert.strictEqual(_.repeat('*', { 'valueOf': lodashStable.constant(3) }), '***');
|
||||
});
|
||||
|
||||
@@ -18909,7 +18910,7 @@
|
||||
QUnit.test('should coerce `n` to an integer', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var actual = _.times(2.4, _.indentify);
|
||||
var actual = _.times(2.6, _.indentify);
|
||||
assert.deepEqual(actual, [0, 1]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user