Skip to content

Commit b7dbe58

Browse files
committed
Move currentBatch into createRouterAct
1 parent eec714a commit b7dbe58

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 = { includes: string; block?: boolean | 'reject' }
2523

2624
/**
@@ -55,6 +53,8 @@ type ActConfig =
5553
export function createRouterAct(
5654
page: Playwright.Page
5755
): <T>(scope: () => Promise<T> | T, config?: ActConfig) => Promise<T> {
56+
let currentBatch: Batch | null = null
57+
5858
/**
5959
* Test utility for requests initiated by the Next.js Router, such as
6060
* prefetches and navigations. Calls the given async function then intercepts

0 commit comments

Comments
 (0)