@@ -27,19 +27,15 @@ describe("api", () => {
27
27
} ) ;
28
28
29
29
it ( "should toString a single module" , ( ) => {
30
- const m = api ( function ( i ) {
31
- return i [ 1 ] ;
32
- } ) ;
30
+ const m = api ( ( i ) => i [ 1 ] ) ;
33
31
34
32
m . push ( [ 1 , "body { a: 1; }" , "" ] ) ;
35
33
36
34
expect ( m . toString ( ) ) . toMatchSnapshot ( ) ;
37
35
} ) ;
38
36
39
37
it ( "should toString multiple modules" , ( ) => {
40
- const m = api ( function ( i ) {
41
- return i [ 1 ] ;
42
- } ) ;
38
+ const m = api ( ( i ) => i [ 1 ] ) ;
43
39
44
40
m . push ( [ 2 , "body { b: 2; }" , "" ] ) ;
45
41
m . push ( [ 1 , "body { a: 1; }" , "" ] ) ;
@@ -48,9 +44,7 @@ describe("api", () => {
48
44
} ) ;
49
45
50
46
it ( "should toString with media query" , ( ) => {
51
- const m = api ( function ( i ) {
52
- return i [ 1 ] ;
53
- } ) ;
47
+ const m = api ( ( i ) => i [ 1 ] ) ;
54
48
55
49
const m1 = [ 1 , "body { a: 1; }" , "screen" ] ;
56
50
const m2 = [ 2 , "body { b: 2; }" , "" ] ;
@@ -66,9 +60,7 @@ describe("api", () => {
66
60
} ) ;
67
61
68
62
it ( "should import modules" , ( ) => {
69
- const m = api ( function ( i ) {
70
- return i [ 1 ] ;
71
- } ) ;
63
+ const m = api ( ( i ) => i [ 1 ] ) ;
72
64
const m1 = [ 1 , "body { a: 1; }" , "(orientation:landscape)" ] ;
73
65
const m2 = [ 2 , "body { b: 2; }" , "" ] ;
74
66
const m3 = [ 3 , "body { c: 3; }" , "" ] ;
@@ -84,9 +76,7 @@ describe("api", () => {
84
76
} ) ;
85
77
86
78
it ( "should import named modules" , ( ) => {
87
- const m = api ( function ( i ) {
88
- return i [ 1 ] ;
89
- } ) ;
79
+ const m = api ( ( i ) => i [ 1 ] ) ;
90
80
const m1 = [ "./module1" , "body { a: 1; }" , "screen" ] ;
91
81
const m2 = [ "./module2" , "body { b: 2; }" , "" ] ;
92
82
const m3 = [ "./module3" , "body { c: 3; }" , "" ] ;
@@ -156,9 +146,7 @@ describe("api", () => {
156
146
} ) ;
157
147
158
148
it ( "should import modules with dedupe" , ( ) => {
159
- const m = api ( function ( i ) {
160
- return i [ 1 ] ;
161
- } ) ;
149
+ const m = api ( ( i ) => i [ 1 ] ) ;
162
150
163
151
const m1 = [ null , "body { b: 1; }" , "" ] ;
164
152
const m2 = [ "./module2" , "body { b: 2; }" , "" ] ;
@@ -175,9 +163,7 @@ describe("api", () => {
175
163
} ) ;
176
164
177
165
it ( "should import modules when module string" , ( ) => {
178
- const m = api ( function ( i ) {
179
- return i [ 1 ] ;
180
- } ) ;
166
+ const m = api ( ( i ) => i [ 1 ] ) ;
181
167
182
168
m . i ( ".button { b: 2; }" ) ;
183
169
m . i ( "" ) ;
0 commit comments