@@ -18,7 +18,7 @@ describe('cli', () => {
18
18
it ( 'should work with a simple file' , async ( ) => {
19
19
const result = await cli ( '__fixtures__/simple/file.svg' )
20
20
expect ( result ) . toMatchSnapshot ( )
21
- } , 10000 )
21
+ } )
22
22
23
23
it ( 'should not work with a directory without --out-dir option' , async ( ) => {
24
24
expect . assertions ( 1 )
@@ -29,7 +29,7 @@ describe('cli', () => {
29
29
'Directory are not supported without `--out-dir` option instead' ,
30
30
)
31
31
}
32
- } , 10000 )
32
+ } )
33
33
34
34
it ( 'should not work with several files without destination' , async ( ) => {
35
35
expect . assertions ( 1 )
@@ -40,19 +40,19 @@ describe('cli', () => {
40
40
'Please specify only one filename or use `--out-dir` option' ,
41
41
)
42
42
}
43
- } , 10000 )
43
+ } )
44
44
45
45
it ( 'should work with stdin' , async ( ) => {
46
46
const result = await cli ( '< __fixtures__/simple/file.svg' )
47
47
expect ( result ) . toMatchSnapshot ( )
48
- } , 10000 )
48
+ } )
49
49
50
50
it ( 'should support stdin filepath' , async ( ) => {
51
51
const result = await cli (
52
52
'--stdin-filepath __fixtures__/simple/file.svg < __fixtures__/simple/file.svg' ,
53
53
)
54
54
expect ( result ) . toMatchSnapshot ( )
55
- } , 10000 )
55
+ } )
56
56
57
57
it ( 'should transform a whole directory and output relative destination paths' , async ( ) => {
58
58
const result = await cli ( '--out-dir __fixtures_build__/whole __fixtures__' )
@@ -62,7 +62,7 @@ describe('cli', () => {
62
62
. map ( ( x ) => x . toLowerCase ( ) )
63
63
. join ( '\n' )
64
64
expect ( sorted ) . toMatchSnapshot ( )
65
- } , 10000 )
65
+ } )
66
66
67
67
it ( 'should transform a whole directory with --typescript' , async ( ) => {
68
68
const result = await cli (
@@ -74,43 +74,43 @@ describe('cli', () => {
74
74
. map ( ( x ) => x . toLowerCase ( ) )
75
75
. join ( '\n' )
76
76
expect ( sorted ) . toMatchSnapshot ( )
77
- } , 10000 )
77
+ } )
78
78
79
79
it ( 'should suppress output when transforming a directory with a --silent option' , async ( ) => {
80
80
const result = await cli (
81
81
'--silent --out-dir __fixtures_build__/whole __fixtures__' ,
82
82
)
83
83
const sorted = result . split ( / \n / ) . sort ( ) . join ( '\n' )
84
84
expect ( sorted ) . toMatchSnapshot ( )
85
- } , 10000 )
85
+ } )
86
86
87
87
it ( 'should support --prettier-config as json' , async ( ) => {
88
88
const result = await cli (
89
89
`--prettier-config '{"tabWidth": 5}' __fixtures__/simple/file.svg` ,
90
90
)
91
91
expect ( result ) . toMatchSnapshot ( )
92
- } , 10000 )
92
+ } )
93
93
94
94
it ( 'should support --prettier-config as file' , async ( ) => {
95
95
const result = await cli (
96
96
`--prettier-config __fixtures__/withPrettierRc/.prettierrc __fixtures__/simple/file.svg` ,
97
97
)
98
98
expect ( result ) . toMatchSnapshot ( )
99
- } , 10000 )
99
+ } )
100
100
101
101
it ( 'should support --svgo-config as json' , async ( ) => {
102
102
const result = await cli (
103
103
`--svgo-config '{"plugins":[{"name":"preset-default","params":{"overrides":{"removeTitle":false}}}]}' __fixtures__/simple/file.svg` ,
104
104
)
105
105
expect ( result ) . toMatchSnapshot ( )
106
- } , 10000 )
106
+ } )
107
107
108
108
it ( 'should support --svgo-config as file' , async ( ) => {
109
109
const result = await cli (
110
110
`--svgo-config __fixtures__/withSvgoConfig/svgo.config.js __fixtures__/simple/file.svg` ,
111
111
)
112
112
expect ( result ) . toMatchSnapshot ( )
113
- } , 10000 )
113
+ } )
114
114
115
115
it . each ( [
116
116
[ '--no-dimensions' ] ,
@@ -164,22 +164,22 @@ describe('cli', () => {
164
164
await del ( outDir )
165
165
await cli ( `--ext=ts ${ inDir } --out-dir=${ outDir } ` )
166
166
expect ( await fs . readdir ( outDir ) ) . toMatchSnapshot ( )
167
- } , 10000 )
167
+ } )
168
168
169
169
it ( 'should support "--ignore-existing"' , async ( ) => {
170
170
const inDir = '__fixtures__/simple'
171
171
const outDir = '__fixtures__/simple-existing'
172
172
await cli ( `${ inDir } --out-dir=${ outDir } --ignore-existing` )
173
173
const content = await fs . readFile ( path . join ( outDir , 'File.js' ) , 'utf-8' )
174
174
expect ( content ) . toBe ( '// nothing' )
175
- } , 10000 )
175
+ } )
176
176
177
177
it ( 'should not override config with cli defaults' , async ( ) => {
178
178
const result = await cli (
179
179
'__fixtures__/simple/file.svg --config-file=__fixtures__/overrides.config.js' ,
180
180
)
181
181
expect ( result ) . toMatchSnapshot ( )
182
- } , 10000 )
182
+ } )
183
183
184
184
it ( 'should add Svg prefix to index.js exports staring with number' , async ( ) => {
185
185
const inDir = '__fixtures__/numeric'
@@ -188,7 +188,7 @@ describe('cli', () => {
188
188
await cli ( `${ inDir } --out-dir=${ outDir } ` )
189
189
const content = await fs . readFile ( path . join ( outDir , 'index.js' ) , 'utf-8' )
190
190
expect ( content ) . toMatchSnapshot ( )
191
- } , 10000 )
191
+ } )
192
192
193
193
it ( 'should support custom index.js with directory output' , async ( ) => {
194
194
const inDir = '__fixtures__/simple'
@@ -199,7 +199,7 @@ describe('cli', () => {
199
199
)
200
200
const content = await fs . readFile ( path . join ( outDir , 'index.js' ) , 'utf-8' )
201
201
expect ( content ) . toMatchSnapshot ( )
202
- } , 10000 )
202
+ } )
203
203
204
204
it ( 'should support --index-template in cli' , async ( ) => {
205
205
const inDir = '__fixtures__/simple'
@@ -210,13 +210,13 @@ describe('cli', () => {
210
210
)
211
211
const content = await fs . readFile ( path . join ( outDir , 'index.js' ) , 'utf-8' )
212
212
expect ( content ) . toMatchSnapshot ( )
213
- } , 10000 )
213
+ } )
214
214
215
215
it ( 'should support --no-index' , async ( ) => {
216
216
const inDir = '__fixtures__/simple'
217
217
const outDir = `__fixtures_build__/no-index-case`
218
218
await del ( outDir )
219
219
await cli ( `--no-index ${ inDir } --out-dir=${ outDir } ` )
220
220
expect ( await fs . readdir ( outDir ) ) . toMatchSnapshot ( )
221
- } , 10000 )
221
+ } )
222
222
} )
1 commit comments
vercel[bot] commentedon Nov 1, 2021
Successfully deployed to the following URLs: