This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 5 files changed +40
-32
lines changed
5 files changed +40
-32
lines changed Original file line number Diff line number Diff line change
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports [` Package exports expected interface 1` ] = `
4
+ Object {
5
+ " Avatar" : [Function ],
6
+ " Button" : [Function ],
7
+ " DangerButton" : [Function ],
8
+ " DataScienceTrackEventTag" : [Function ],
9
+ " DataScienceTrackTag" : [Function ],
10
+ " DesignTrackEventTag" : [Function ],
11
+ " DesignTrackTag" : [Function ],
12
+ " DevelopmentTrackEventTag" : [Function ],
13
+ " DevelopmentTrackTag" : [Function ],
14
+ " GhostButton" : [Function ],
15
+ " PrimaryButton" : [Function ],
16
+ " SecondaryButton" : [Function ],
17
+ " Tag" : [Function ],
18
+ }
19
+ ` ;
Original file line number Diff line number Diff line change 1
1
import iface from '../src' ;
2
2
3
3
test ( 'Package exports expected interface' , ( ) => {
4
- expect ( iface ) . toHaveProperty ( 'Avatar' ) ;
5
-
6
- /* components/buttons */
7
- expect ( iface ) . toHaveProperty ( 'Button' ) ;
8
- expect ( iface ) . toHaveProperty ( 'DangerButton' ) ;
9
- expect ( iface ) . toHaveProperty ( 'GhostButton' ) ;
10
- expect ( iface ) . toHaveProperty ( 'PrimaryButton' ) ;
11
- expect ( iface ) . toHaveProperty ( 'SecondaryButton' ) ;
12
-
13
- /* components/tags */
14
- expect ( iface ) . toHaveProperty ( 'Tag' ) ;
15
- expect ( iface ) . toHaveProperty ( 'DataScienceTrackTag' ) ;
16
- expect ( iface ) . toHaveProperty ( 'DataScienceTrackEventTag' ) ;
17
- expect ( iface ) . toHaveProperty ( 'DesignTrackTag' ) ;
18
- expect ( iface ) . toHaveProperty ( 'DesignTrackEventTag' ) ;
19
- expect ( iface ) . toHaveProperty ( 'DevelopmentTrackTag' ) ;
20
- expect ( iface ) . toHaveProperty ( 'DevelopmentTrackEventTag' ) ;
4
+ expect ( iface ) . toMatchSnapshot ( ) ;
21
5
} ) ;
Original file line number Diff line number Diff line change 32
32
"lint:scss" : " ./node_modules/.bin/stylelint **/*.scss --syntax scss" ,
33
33
"test" : " npm run lint && npm run jest"
34
34
},
35
- "version" : " 0.4.2 " ,
35
+ "version" : " 0.4.3 " ,
36
36
"dependencies" : {
37
37
"react" : " ^16.4.1" ,
38
38
"react-css-super-themr" : " ^2.2.0" ,
39
39
"react-dom" : " ^16.4.1" ,
40
- "topcoder-react-utils" : " ^0.6.5 "
40
+ "topcoder-react-utils" : " ^0.6.7 "
41
41
},
42
42
"devDependencies" : {
43
43
"autoprefixer" : " ^8.6.3" ,
Original file line number Diff line number Diff line change 1
- import 'styles/global.scss' ;
2
- import Avatar from 'components/Avatar' ;
3
- import * as buttons from 'components/buttons' ;
4
- import * as tags from 'components/tags' ;
1
+ /* NOTE: Order of imports is important here, this is also the reason to
2
+ * avoid `import` instructions, as they are silently re-ordered on top by
3
+ * the compiler. */
5
4
6
5
/* eslint-disable global-require */
7
6
if ( process . env . NODE_ENV === 'production' ) {
@@ -11,6 +10,12 @@ if (process.env.NODE_ENV === 'production') {
11
10
}
12
11
/* eslint-enable global-require */
13
12
13
+ require ( 'styles/global.scss' ) ;
14
+
15
+ const Avatar = require ( 'components/Avatar' ) . default ;
16
+ const buttons = require ( 'components/buttons' ) ;
17
+ const tags = require ( 'components/tags' ) ;
18
+
14
19
module . exports = {
15
20
Avatar,
16
21
...buttons ,
You can’t perform that action at this time.
0 commit comments