Skip to content

Commit 139e76a

Browse files
committed
Move currentBatch into createRouterAct
1 parent 2733814 commit 139e76a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lib/e2e-utils/router-act.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ type PendingRSCRequest = {
1919
didProcess: boolean
2020
}
2121

22-
let currentBatch: Batch | null = null
23-
2422
type ExpectedResponseConfig = {
2523
includes: string
2624
block?: boolean | 'reject'
@@ -59,6 +57,8 @@ type ActConfig =
5957
export function createRouterAct(
6058
page: Playwright.Page
6159
): <T>(scope: () => Promise<T> | T, config?: ActConfig) => Promise<T> {
60+
let currentBatch: Batch | null = null
61+
6262
/**
6363
* Test utility for requests initiated by the Next.js Router, such as
6464
* prefetches and navigations. Calls the given async function then intercepts

0 commit comments

Comments
 (0)