1
+ /* eslint-disable jest/no-standalone-expect */
1
2
import { nextTestSetup } from 'e2e-utils'
3
+ ; ( process . env . IS_TURBOPACK_TEST ? describe : describe . skip ) (
4
+ 'turbopack-turbo-config-compatibility' ,
5
+ ( ) => {
6
+ describe ( 'including both turbopack and deprecated experimental turbo config' , ( ) => {
7
+ const { next } = nextTestSetup ( {
8
+ files : __dirname ,
9
+ } )
2
10
3
- describe ( ' turbopack- turbo- config-compatibility' , ( ) => {
4
- describe ( 'including both turbopack and deprecated experimental turbo config' , ( ) => {
5
- const { next , isTurbopack } = nextTestSetup ( {
6
- files : __dirname ,
11
+ it ( 'prefers turbopack config over deprecated experimental turbo config' , async ( ) => {
12
+ const $ = await next . render$ ( '/' )
13
+ expect ( $ ( '#result' ) . text ( ) ) . toEqual ( 'Hello turbopack' )
14
+ } )
7
15
} )
8
16
9
- if ( ! isTurbopack ) {
10
- return
11
- }
12
-
13
- it ( 'prefers turbopack config over deprecated experimental turbo config' , async ( ) => {
14
- const $ = await next . render$ ( '/' )
15
- expect ( $ ( '#result' ) . text ( ) ) . toEqual ( 'Hello turbopack' )
16
- } )
17
- } )
18
-
19
- describe ( 'only including deprecated experimental turbo config' , ( ) => {
20
- const { next, isTurbopack } = nextTestSetup ( {
21
- files : __dirname ,
22
- overrideFiles : {
23
- 'next.config.js' : `module.exports = {
17
+ describe ( 'only including deprecated experimental turbo config' , ( ) => {
18
+ const { next } = nextTestSetup ( {
19
+ files : __dirname ,
20
+ overrideFiles : {
21
+ 'next.config.js' : `module.exports = {
24
22
experimental: {
25
23
turbo: {
26
24
resolveAlias: {
@@ -29,16 +27,13 @@ describe('turbopack-turbo-config-compatibility', () => {
29
27
},
30
28
},
31
29
}` ,
32
- } ,
33
- } )
34
-
35
- if ( ! isTurbopack ) {
36
- return
37
- }
30
+ } ,
31
+ } )
38
32
39
- it ( 'still uses the deprecated experimental turbo config' , async ( ) => {
40
- const $ = await next . render$ ( '/' )
41
- expect ( $ ( '#result' ) . text ( ) ) . toEqual ( 'Hello turbo' )
33
+ it ( 'still uses the deprecated experimental turbo config' , async ( ) => {
34
+ const $ = await next . render$ ( '/' )
35
+ expect ( $ ( '#result' ) . text ( ) ) . toEqual ( 'Hello turbo' )
36
+ } )
42
37
} )
43
- } )
44
- } )
38
+ }
39
+ )
0 commit comments