Open PindaPixel opened 3 years ago
I'm intermittently seeing this error as well. Mostly in CI, not locally. It's totally intermittent though, afaikt.
I got the same error :( Good to have it fixed
Also, getting the same error. Fresh install, simple test case like the OP.
This looks like it may be a @web/test-runner
issue. Posted there:
Quick checklist
What package manager are you using?
yarn berry
What operating system are you using?
Windows
Describe the bug
I cannot get web-test-runner to get to work and I'm not sure where the fault lies. I've seen issues with the same error in the web-test-runner repo, but those are supposedly fixed.
Steps to reproduce
yarn create snowpack-app
using template@snowpack/react-typescript
yarn set version berry
-> delete node_modules ->yarn install
web-test-runner \"src/**/*.test.tsx\"
toweb-test-runner \"tests/**/*.test.{ts,tsx}\"
yarn dlx @yarnpkg/sdks vscode
TypeScript: Select TypeScript version
-> use workspace version.describe('Test test', () => { it('Does a test!', () => { assert.equal(1, 1); }); });
$ yarn test [snowpack] starting server... [12:55:54] [snowpack] Ready! [12:55:54] [snowpack] Server started in 33ms. [12:55:54] [snowpack] Local: http://localhost:8080 [12:55:54] [snowpack] Network: http://...:8080
[12:55:54] [snowpack] watching for file changes... [12:55:55] [@snowpack/plugin-typescript] [12:55:55] [@snowpack/plugin-typescript] 11:54:55 AM - Starting compilation in watch mode... tests\test.test.tsx:
🚧 Browser logs: TypeError: Failed to fetch dynamically imported module: http://localhost:8000/tests/test.test.tsx?wtr-session-id=v7oWSrQQbvgJFuIoqzsJT
❌ Could not import your test module. Check the browser logs or open the browser in debug mode for more information.
Chrome: |██████████████████████████████| 1/1 test files | 0 passed, 0 failed
Error while running tests.