1
- /* eslint-env jest */
2
1
import { nextTestSetup } from 'e2e-utils'
3
2
import { retry } from 'next-test-utils'
4
3
import { createProxyServer } from 'next/experimental/testmode/proxy'
@@ -8,8 +7,12 @@ import * as Log from './utils/log'
8
7
9
8
const runtimes = [ 'nodejs' , 'edge' ]
10
9
10
+ const isReactExperimental =
11
+ process . env . __NEXT_EXPERIMENTAL_PPR === 'true' ||
12
+ process . env . __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY === 'true'
13
+
11
14
describe . each ( runtimes ) ( 'after() in %s runtime' , ( runtimeValue ) => {
12
- const { next, isNextDeploy, skipped } = nextTestSetup ( {
15
+ const { next, isNextDeploy, skipped, isTurbopack } = nextTestSetup ( {
13
16
files : __dirname ,
14
17
// `patchFile` and reading runtime logs are not supported in a deployed environment
15
18
skipDeployment : true ,
@@ -98,18 +101,22 @@ describe.each(runtimes)('after() in %s runtime', (runtimeValue) => {
98
101
} )
99
102
100
103
describe ( 'interrupted RSC renders' , ( ) => {
101
- it ( 'runs callbacks if redirect() was called' , async ( ) => {
102
- await next . browser ( pathPrefix + '/interrupted/calls-redirect' )
104
+ // This is currently broken with experimental React & Turbopack
105
+ // https://github.com/vercel/next.js/pull/75989
106
+ if ( ! isTurbopack && ! isReactExperimental ) {
107
+ it ( 'runs callbacks if redirect() was called' , async ( ) => {
108
+ await next . browser ( pathPrefix + '/interrupted/calls-redirect' )
103
109
104
- await retry ( ( ) => {
105
- expect ( getLogs ( ) ) . toContainEqual ( {
106
- source : '[page] /interrupted/calls-redirect' ,
107
- } )
108
- expect ( getLogs ( ) ) . toContainEqual ( {
109
- source : '[page] /interrupted/redirect-target' ,
110
+ await retry ( ( ) => {
111
+ expect ( getLogs ( ) ) . toContainEqual ( {
112
+ source : '[page] /interrupted/calls-redirect' ,
113
+ } )
114
+ expect ( getLogs ( ) ) . toContainEqual ( {
115
+ source : '[page] /interrupted/redirect-target' ,
116
+ } )
110
117
} )
111
118
} )
112
- } )
119
+ }
113
120
114
121
it ( 'runs callbacks if notFound() was called' , async ( ) => {
115
122
await next . browser ( pathPrefix + '/interrupted/calls-not-found' )
0 commit comments