@@ -167,11 +167,22 @@ describe('cli', () => {
167167 expect ( result ) . toMatchSnapshot ( )
168168 } , 10000 )
169169
170+ it ( 'should add Svg prefix to index.js exports staring with number' , async ( ) => {
171+ const inDir = '__fixtures__/numeric'
172+ const outDir = `__fixtures_build__/prefix-exports`
173+ await del ( outDir )
174+ await cli ( `${ inDir } --out-dir=${ outDir } ` )
175+ const content = fs . readFileSync ( path . join ( outDir , 'index.js' ) , 'utf-8' )
176+ expect ( content ) . toMatchSnapshot ( )
177+ } , 10000 )
178+
170179 it ( 'should support custom index.js with directory output' , async ( ) => {
171180 const inDir = '__fixtures__/simple'
172181 const outDir = `__fixtures_build__/custom-index`
173182 await del ( outDir )
174- await cli ( `${ inDir } --out-dir=${ outDir } --config-file=__fixtures__/custom-index.config.js` )
183+ await cli (
184+ `${ inDir } --out-dir=${ outDir } --config-file=__fixtures__/custom-index.config.js` ,
185+ )
175186 const content = fs . readFileSync ( path . join ( outDir , 'index.js' ) , 'utf-8' )
176187 expect ( content ) . toMatchSnapshot ( )
177188 } , 10000 )
@@ -180,7 +191,9 @@ describe('cli', () => {
180191 const inDir = '__fixtures__/simple'
181192 const outDir = `__fixtures_build__/custom-index-arg`
182193 await del ( outDir )
183- await cli ( `${ inDir } --out-dir=${ outDir } --index-template=__fixtures__/custom-index-template.js` )
194+ await cli (
195+ `${ inDir } --out-dir=${ outDir } --index-template=__fixtures__/custom-index-template.js` ,
196+ )
184197 const content = fs . readFileSync ( path . join ( outDir , 'index.js' ) , 'utf-8' )
185198 expect ( content ) . toMatchSnapshot ( )
186199 } , 10000 )
0 commit comments