@@ -27,19 +27,15 @@ describe("api", () => {
2727 } ) ;
2828
2929 it ( "should toString a single module" , ( ) => {
30- const m = api ( function ( i ) {
31- return i [ 1 ] ;
32- } ) ;
30+ const m = api ( ( i ) => i [ 1 ] ) ;
3331
3432 m . push ( [ 1 , "body { a: 1; }" , "" ] ) ;
3533
3634 expect ( m . toString ( ) ) . toMatchSnapshot ( ) ;
3735 } ) ;
3836
3937 it ( "should toString multiple modules" , ( ) => {
40- const m = api ( function ( i ) {
41- return i [ 1 ] ;
42- } ) ;
38+ const m = api ( ( i ) => i [ 1 ] ) ;
4339
4440 m . push ( [ 2 , "body { b: 2; }" , "" ] ) ;
4541 m . push ( [ 1 , "body { a: 1; }" , "" ] ) ;
@@ -48,9 +44,7 @@ describe("api", () => {
4844 } ) ;
4945
5046 it ( "should toString with media query" , ( ) => {
51- const m = api ( function ( i ) {
52- return i [ 1 ] ;
53- } ) ;
47+ const m = api ( ( i ) => i [ 1 ] ) ;
5448
5549 const m1 = [ 1 , "body { a: 1; }" , "screen" ] ;
5650 const m2 = [ 2 , "body { b: 2; }" , "" ] ;
@@ -66,9 +60,7 @@ describe("api", () => {
6660 } ) ;
6761
6862 it ( "should import modules" , ( ) => {
69- const m = api ( function ( i ) {
70- return i [ 1 ] ;
71- } ) ;
63+ const m = api ( ( i ) => i [ 1 ] ) ;
7264 const m1 = [ 1 , "body { a: 1; }" , "(orientation:landscape)" ] ;
7365 const m2 = [ 2 , "body { b: 2; }" , "" ] ;
7466 const m3 = [ 3 , "body { c: 3; }" , "" ] ;
@@ -84,9 +76,7 @@ describe("api", () => {
8476 } ) ;
8577
8678 it ( "should import named modules" , ( ) => {
87- const m = api ( function ( i ) {
88- return i [ 1 ] ;
89- } ) ;
79+ const m = api ( ( i ) => i [ 1 ] ) ;
9080 const m1 = [ "./module1" , "body { a: 1; }" , "screen" ] ;
9181 const m2 = [ "./module2" , "body { b: 2; }" , "" ] ;
9282 const m3 = [ "./module3" , "body { c: 3; }" , "" ] ;
@@ -156,9 +146,7 @@ describe("api", () => {
156146 } ) ;
157147
158148 it ( "should import modules with dedupe" , ( ) => {
159- const m = api ( function ( i ) {
160- return i [ 1 ] ;
161- } ) ;
149+ const m = api ( ( i ) => i [ 1 ] ) ;
162150
163151 const m1 = [ null , "body { b: 1; }" , "" ] ;
164152 const m2 = [ "./module2" , "body { b: 2; }" , "" ] ;
@@ -175,9 +163,7 @@ describe("api", () => {
175163 } ) ;
176164
177165 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 ] ) ;
181167
182168 m . i ( ".button { b: 2; }" ) ;
183169 m . i ( "" ) ;
0 commit comments