File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ import { DateString } from 'loopback' ;
2+ import lb , { DateString as DS } from './loopback' ;
3+
4+ describe ( 'loopback' , ( ) => {
5+ it ( 'exports DateString with parse' , ( ) => {
6+ expect ( DS ) . toEqual ( DateString ) ;
7+ expect ( DS . parse ) . toBeDefined ( ) ;
8+ } ) ;
9+
10+ it ( 'parses a DateString object' , ( ) => {
11+ const date = { when : '2017-01-01' } ;
12+ const orignParsed = new DateString ( date . when ) ;
13+ expect ( DS . parse ( date ) ) . toEqual ( orignParsed ) ;
14+ expect ( DS . parse ( date . when ) ) . toEqual ( orignParsed ) ;
15+ } ) ;
16+
17+ it ( 'export extended axios' , ( ) => {
18+ expect ( lb ) . toEqual ( expect . any ( Function ) ) ;
19+ expect ( lb . find ) . toEqual ( expect . any ( Function ) ) ;
20+ expect ( lb . removeToken ) . toEqual ( expect . any ( Function ) ) ;
21+ expect ( lb . setToken ) . toEqual ( expect . any ( Function ) ) ;
22+ expect ( lb . setLoadingFunction ) . toEqual ( expect . any ( Function ) ) ;
23+ } ) ;
24+ } ) ;
You can’t perform that action at this time.
0 commit comments