This repository was archived by the owner on Apr 9, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +75
-19
lines changed Expand file tree Collapse file tree 5 files changed +75
-19
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "plugins" : [" ../../../src" ],
3
+ "extra" : {
4
+ "react-transform" : {
5
+ "transforms" : [
6
+ {
7
+ "transform" : " my-custom-module/wrap" ,
8
+ "locals" : [" module" ],
9
+ "imports" : [" react" ]
10
+ },
11
+ {
12
+ "transform" : " my-other-custom-module/wrap"
13
+ }
14
+ ]
15
+ }
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "plugins" : [" ../../../src" ],
3
+ "extra" : {
4
+ "react-transform" : {
5
+ "transforms" : [
6
+ {
7
+ "transform" : " my-custom-module/wrap" ,
8
+ "locals" : [" module" ],
9
+ "imports" : [" react" ]
10
+ },
11
+ {
12
+ "transform" : " my-other-custom-module/wrap"
13
+ }
14
+ ],
15
+ "factoryMethods" : [
16
+ " React.createClass" ,
17
+ " createClass" ,
18
+ " myComponentFactory"
19
+ ]
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "plugins" : [" ../../../src" ],
3
+ "extra" : {
4
+ "react-transform" : {
5
+ "transforms" : [
6
+ {
7
+ "transform" : " my-custom-module/wrap" ,
8
+ "locals" : [" module" ],
9
+ "imports" : [" react" ]
10
+ },
11
+ {
12
+ "transform" : " my-other-custom-module/wrap"
13
+ }
14
+ ]
15
+ }
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "plugins" : [" ../../../src" ],
3
+ "extra" : {
4
+ "react-transform" : {
5
+ "transforms" : [
6
+ {
7
+ "transform" : " my-custom-module/wrap" ,
8
+ "locals" : [" module" ],
9
+ "imports" : [" react" ]
10
+ },
11
+ {
12
+ "transform" : " my-other-custom-module/wrap"
13
+ }
14
+ ]
15
+ }
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -14,25 +14,8 @@ describe('finds React components', () => {
14
14
it ( `should ${ caseName . split ( '-' ) . join ( ' ' ) } ` , ( ) => {
15
15
const fixtureDir = path . join ( fixturesDir , caseName ) ;
16
16
const actualPath = path . join ( fixtureDir , 'actual.js' ) ;
17
- const actual = transformFileSync ( actualPath , {
18
- plugins : [ plugin ] ,
19
- extra : {
20
- 'react-transform' : {
21
- transforms : [ {
22
- transform : 'my-custom-module/wrap' ,
23
- locals : [ 'module' ] ,
24
- imports : [ 'react' ]
25
- } , {
26
- transform : 'my-other-custom-module/wrap'
27
- } ] ,
28
- factoryMethods : [
29
- 'React.createClass' ,
30
- 'createClass' ,
31
- 'myComponentFactory'
32
- ]
33
- }
34
- }
35
- } ) . code ;
17
+ const actual = transformFileSync ( actualPath ) . code ;
18
+
36
19
const expected = fs . readFileSync (
37
20
path . join ( fixtureDir , 'expected.js' )
38
21
) . toString ( ) . replace ( / % F I X T U R E _ P A T H % / g, actualPath ) ;
You can’t perform that action at this time.
0 commit comments