Playwright tests with the next
fixture always fail (using experimental testProxy)
#77449
Labels
Testing
Related to testing with Next.js.
Link to the code that reproduces this issue
https://github.com/GRA0007/next-test-proxy-repro
To Reproduce
NextFixture
to mock a request (following instructions from here)NextFixture
is used, the test fails with the errorTypeError: Cannot destructure property 'complete' of 'undefined' as it is undefined.
Current vs. Expected behavior
I expect mocking a request to successfully mock the request without causing an error. All the tests I've set up in my reproduction should pass.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:51:54 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: 1.22.21 pnpm: 10.6.5 Relevant Packages: next: 15.2.3 // Latest available version is detected (15.2.3). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.8.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Testing
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
I initially started making this reproduction because I notice that the
testProxy
didn't work withGET
route handlers, only with pages, but it seems something else is going on because I can't get any of the mocked tests to work.The text was updated successfully, but these errors were encountered: