This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +40
-32
lines changed Expand file tree Collapse file tree 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 11import iface from '../src' ;
22
33test ( '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 ( ) ;
215} ) ;
Original file line number Diff line number Diff line change 3232 "lint:scss" : " ./node_modules/.bin/stylelint **/*.scss --syntax scss" ,
3333 "test" : " npm run lint && npm run jest"
3434 },
35- "version" : " 0.4.2 " ,
35+ "version" : " 0.4.3 " ,
3636 "dependencies" : {
3737 "react" : " ^16.4.1" ,
3838 "react-css-super-themr" : " ^2.2.0" ,
3939 "react-dom" : " ^16.4.1" ,
40- "topcoder-react-utils" : " ^0.6.5 "
40+ "topcoder-react-utils" : " ^0.6.7 "
4141 },
4242 "devDependencies" : {
4343 "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. */
54
65/* eslint-disable global-require */
76if ( process . env . NODE_ENV === 'production' ) {
@@ -11,6 +10,12 @@ if (process.env.NODE_ENV === 'production') {
1110}
1211/* eslint-enable global-require */
1312
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+
1419module . exports = {
1520 Avatar,
1621 ...buttons ,
You can’t perform that action at this time.
0 commit comments