@@ -14,39 +14,46 @@ let appPort
14
14
let app
15
15
let devOutput
16
16
17
- describe ( 'svgo-webpack with Image Component' , ( ) => {
18
- ; ( process . env . TURBOPACK ? describe . skip : describe ) ( 'production mode' , ( ) => {
19
- it ( 'should not fail to build invalid usage of the Image component' , async ( ) => {
20
- const { stderr, code } = await nextBuild ( appDir , [ ] , { stderr : true } )
21
- const errors = stderr
22
- . split ( '\n' )
23
- . filter ( ( line ) => line && ! line . trim ( ) . startsWith ( '⚠️' ) )
24
- expect ( errors ) . toEqual ( [ ] )
25
- expect ( code ) . toBe ( 0 )
26
- } )
27
- } )
17
+ // Skip as this is a webpack specific test.
18
+ ; ( process . env . TURBOPACK ? describe . skip : describe ) (
19
+ 'svgo-webpack with Image Component' ,
20
+ ( ) => {
21
+ ; ( process . env . TURBOPACK ? describe . skip : describe ) (
22
+ 'production mode' ,
23
+ ( ) => {
24
+ it ( 'should not fail to build invalid usage of the Image component' , async ( ) => {
25
+ const { stderr, code } = await nextBuild ( appDir , [ ] , { stderr : true } )
26
+ const errors = stderr
27
+ . split ( '\n' )
28
+ . filter ( ( line ) => line && ! line . trim ( ) . startsWith ( '⚠️' ) )
29
+ expect ( errors ) . toEqual ( [ ] )
30
+ expect ( code ) . toBe ( 0 )
31
+ } )
32
+ }
33
+ )
28
34
29
- describe ( 'development mode' , ( ) => {
30
- beforeAll ( async ( ) => {
31
- devOutput = { stdout : '' , stderr : '' }
32
- appPort = await findPort ( )
33
- app = await launchApp ( appDir , appPort , {
34
- onStdout : ( msg ) => {
35
- devOutput . stdout += msg
36
- } ,
37
- onStderr : ( msg ) => {
38
- devOutput . stderr += msg
39
- } ,
35
+ describe ( 'development mode' , ( ) => {
36
+ beforeAll ( async ( ) => {
37
+ devOutput = { stdout : '' , stderr : '' }
38
+ appPort = await findPort ( )
39
+ app = await launchApp ( appDir , appPort , {
40
+ onStdout : ( msg ) => {
41
+ devOutput . stdout += msg
42
+ } ,
43
+ onStderr : ( msg ) => {
44
+ devOutput . stderr += msg
45
+ } ,
46
+ } )
40
47
} )
41
- } )
42
- afterAll ( ( ) => killApp ( app ) )
48
+ afterAll ( ( ) => killApp ( app ) )
43
49
44
- it ( 'should print error when invalid Image usage' , async ( ) => {
45
- await renderViaHTTP ( appPort , '/' , { } )
46
- const errors = devOutput . stderr
47
- . split ( '\n' )
48
- . filter ( ( line ) => line && ! line . trim ( ) . startsWith ( '⚠️' ) )
49
- expect ( errors ) . toEqual ( [ ] )
50
+ it ( 'should print error when invalid Image usage' , async ( ) => {
51
+ await renderViaHTTP ( appPort , '/' , { } )
52
+ const errors = devOutput . stderr
53
+ . split ( '\n' )
54
+ . filter ( ( line ) => line && ! line . trim ( ) . startsWith ( '⚠️' ) )
55
+ expect ( errors ) . toEqual ( [ ] )
56
+ } )
50
57
} )
51
- } )
52
- } )
58
+ }
59
+ )
0 commit comments