mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Add _.split test for limit.
This commit is contained in:
@@ -17619,11 +17619,12 @@
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
QUnit.test('should support string split', function(assert) {
|
QUnit.test('should support string split', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(3);
|
||||||
|
|
||||||
var string = 'abcde';
|
var string = 'abcde';
|
||||||
assert.deepEqual(_.split(string, 'c'), ['ab', 'de']);
|
assert.deepEqual(_.split(string, 'c'), ['ab', 'de']);
|
||||||
assert.deepEqual(_.split(string, /[bd]/), ['a', 'c', 'e']);
|
assert.deepEqual(_.split(string, /[bd]/), ['a', 'c', 'e']);
|
||||||
|
assert.deepEqual(_.split(string, '', 2), ['a', 'b']);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should allow mixed string and array prototype methods', function(assert) {
|
QUnit.test('should allow mixed string and array prototype methods', function(assert) {
|
||||||
|
|||||||
Reference in New Issue
Block a user