You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried to point it to the location set when using azure through the nuxt configs in playwright.config.ts but the same suffix including server/index.mjs keeps being appended so no entry point is found.
Additional context
Overwriting the preset through nuxtConfig to use node-server in playwright.config.ts or using the utils directly from @playwright/test and replacing nuxt configs with a webServer running against azure CLI built preview works, but neither one of these are ideal solutions.
Logs
No response
The text was updated successfully, but these errors were encountered:
Hey @WatCodeDatCode! I'm here to help you with any bugs, questions, or contributions. Let's work together to solve the issue you're facing.
To resolve the issue with Playwright tests failing due to the incorrect module path when using the Nitro preset for Azure in your Nuxt 3.12.4 project, you can ensure that the module paths are correctly specified in your package.json file. The exports field in the package.json of @nuxt/test-utils should correctly map the module paths.
Here is the relevant section from the package.json:
Ensure that these paths are correctly pointing to the respective modules. If there are any discrepancies or missing paths, you should update them accordingly. Additionally, you can configure your Playwright tests to use a preconfigured Nuxt fixture by extending the base test configuration as shown below:
Environment
Reproduction
https://codesandbox.io/p/devbox/modest-stonebraker-m9jvcl?file=%2Fplaywright.config.ts%3A13%2C1&workspaceId=7242797e-8630-4ea5-a2a8-c0ae92eb9b43
Describe the bug
When using the built-in utils from
@nuxt/test-utils/playwright
using the azure preset for nitro, runningpnpm exec playwright test
fails with:Error: Cannot find module '/.nuxt/test/xxxx/output/server/index.mjs'
I have tried to point it to the location set when using azure through the nuxt configs in
playwright.config.ts
but the same suffix includingserver/index.mjs
keeps being appended so no entry point is found.Additional context
Overwriting the preset through
nuxtConfig
to usenode-server
inplaywright.config.ts
or using the utils directly from@playwright/test
and replacing nuxt configs with awebServer
running against azure CLI built preview works, but neither one of these are ideal solutions.Logs
No response
The text was updated successfully, but these errors were encountered: