File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,24 @@ describe('utils', function () {
80
80
} ) ;
81
81
} ) ;
82
82
83
+ describe ( '.some()' , function ( ) {
84
+ var some = utils . some ;
85
+
86
+ it ( 'should return true when some array elements pass the check of the fn parameter' , function ( ) {
87
+ var result = some ( [ 'a' , 'b' , 'c' ] , function ( e ) {
88
+ return e === 'b' ;
89
+ } ) ;
90
+ result . should . eql ( true ) ;
91
+ } ) ;
92
+
93
+ it ( 'should return false when none of the array elements pass the check of the fn parameter' , function ( ) {
94
+ var result = some ( [ 'a' , 'b' , 'c' ] , function ( e ) {
95
+ return e === 'd' ;
96
+ } ) ;
97
+ result . should . eql ( false ) ;
98
+ } ) ;
99
+ } ) ;
100
+
83
101
describe ( '.parseQuery()' , function ( ) {
84
102
var parseQuery = utils . parseQuery ;
85
103
it ( 'should get queryString and return key-value object' , function ( ) {
You can’t perform that action at this time.
0 commit comments