File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1- import { kindOfTest } from '../../../lib/utils' ;
1+ import utils from '../../../lib/utils' ;
22
3- describe ( 'utils::endsWith' , function ( ) {
4- it ( 'should return true if the string ends with passed substring' , function ( ) {
5- const test = kindOfTest ( 'number' ) ;
3+ const { kindOf} = utils ;
64
7- expect ( test ( 123 ) ) . toEqual ( true ) ;
8- expect ( test ( '123' ) ) . toEqual ( false ) ;
5+ describe ( 'utils::kindOf' , function ( ) {
6+ it ( 'should return object tag' , function ( ) {
7+ expect ( kindOf ( { } ) ) . toEqual ( 'object' ) ;
8+ // cached result
9+ expect ( kindOf ( { } ) ) . toEqual ( 'object' ) ;
10+ expect ( kindOf ( [ ] ) ) . toEqual ( 'array' ) ;
911 } ) ;
1012} ) ;
Original file line number Diff line number Diff line change 1- import utils from '../../../lib/utils' ;
1+ import { kindOfTest } from '../../../lib/utils' ;
22
3- const { kindOf} = utils ;
3+ describe ( 'utils::kindOfTest' , function ( ) {
4+ it ( 'should return true if the type is matched' , function ( ) {
5+ const test = kindOfTest ( 'number' ) ;
46
5- describe ( 'utils::kindOf' , function ( ) {
6- it ( 'should return object tag' , function ( ) {
7- expect ( kindOf ( { } ) ) . toEqual ( 'object' ) ;
8- // cached result
9- expect ( kindOf ( { } ) ) . toEqual ( 'object' ) ;
10- expect ( kindOf ( [ ] ) ) . toEqual ( 'array' ) ;
7+ expect ( test ( 123 ) ) . toEqual ( true ) ;
8+ expect ( test ( '123' ) ) . toEqual ( false ) ;
119 } ) ;
1210} ) ;
You can’t perform that action at this time.
0 commit comments