Skip to content

Commit 69c0897

Browse files
committed
sparse args test
1 parent 60853f3 commit 69c0897

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

test.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
/*!
2-
* arr-diff <https://github.com/jonschlinkert/arr-diff>
3-
*
4-
* Copyright (c) 2014 Jon Schlinkert, contributors.
5-
* Licensed under the MIT License
6-
*/
7-
81
'use strict';
92

10-
var should = require('should');
3+
/* deps: mocha */
4+
require('should');
115
var diff = require('./');
126

137
describe('diff', function () {
@@ -34,8 +28,11 @@ describe('diff', function () {
3428
diff(['a', 'b', 'c'], []).should.eql(['a', 'b', 'c']);
3529
});
3630

37-
it('should return the first array if the second array is null or undefined:', function () {
38-
diff(['a', 'b', 'c'], null).should.eql(['a', 'b', 'c']);
31+
it('should return the first array if no other args are passed:', function () {
3932
diff(['a', 'b', 'c']).should.eql(['a', 'b', 'c']);
4033
});
34+
35+
it('should iterate over sparse arguments:', function () {
36+
diff(['a', 'b', 'c'], null, ['a', 'b']).should.eql(['c']);
37+
});
4138
});

0 commit comments

Comments
 (0)