mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Use baseToString in _.truncate.
This commit is contained in:
@@ -21856,6 +21856,13 @@
|
||||
assert.strictEqual(_.truncate(string, { 'omission': ' [...]' }), 'hi-diddly-ho there, neig [...]');
|
||||
});
|
||||
|
||||
QUnit.test('should coerce nullish `omission` values to strings', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
assert.strictEqual(_.truncate(string, { 'omission': null }), 'hi-diddly-ho there, neighbnull');
|
||||
assert.strictEqual(_.truncate(string, { 'omission': undefined }), 'hi-diddly-ho there, nundefined');
|
||||
});
|
||||
|
||||
QUnit.test('should support a `length` option', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user