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 created a default example Svelte Kit app, and have amended it to use Jest for testing instead of Playwright (using svelte-jester amongst other things).
On the command line, the jest tests work just fine.
Using WallabyJS inside VS Code, however, the tests do not run. The WallabyJS console indicates it is failing in the svelte-jester preprocess step:
[Error] Runtime error: Command failed: node --unhandled-rejections=strict --abort-on-uncaught-exception "./node_modules/svelte-jester/dist/preprocess.js"
[Error] internal/process/promises.js:194
[Error] triggerUncaughtException(err, true /* fromPromise */);
[Error] ^
[Error] TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of SyntaxError
[Error] at validChunk (_stream_writable.js:281:10)
[Error] at Socket.Writable.write (_stream_writable.js:316:21)
[Error] at file://./node_modules/svelte-jester/dist/preprocess.js:21:32
[Error] Emitted 'error' event on Socket instance at:
[Error] at errorOrDestroy (internal/streams/destroy.js:108:12)
[Error] at validChunk (_stream_writable.js:284:5)
[Error] at Socket.Writable.write (_stream_writable.js:316:21)
[Error] at file://./node_modules/svelte-jester/dist/preprocess.js:21:32 {
[Error] code: 'ERR_INVALID_ARG_TYPE'
[Error] }
[Error] 1: 0x1011f7a65 node::Abort() (.cold.1) [/Users/myusername/.nvm/versions/node/v12.22.5/bin/node]
It looks like the preprocessor is being invoked with node 12.22.5 instead of 14.17.5 like the rest of the project. However, if I nvm use 12 on the command line and run npx jest, the tests still work, so I'm not sure if it's a simple node version issue.
I'm wondering if you have somehow switched node versions at some point and Wallaby was started with 14 (e.g. from VS Code) but your system is using node 12. It seems like for your machine/environment, when you are using Wallaby, this code in svelter is resolving node 12 instead of node 14 which is causing problems.
Issue description or question
I created a default example Svelte Kit app, and have amended it to use Jest for testing instead of Playwright (using svelte-jester amongst other things).
On the command line, the jest tests work just fine.
Using WallabyJS inside VS Code, however, the tests do not run. The WallabyJS console indicates it is failing in the svelte-jester preprocess step:
It looks like the preprocessor is being invoked with node 12.22.5 instead of 14.17.5 like the rest of the project. However, if I
nvm use 12
on the command line and runnpx jest
, the tests still work, so I'm not sure if it's a simple node version issue.A reproduction repo is available here: https://github.com/abirtley/svelte-wallaby-reproduction/
Thanks in advance for any insights you may have☺️
Wallaby diagnostics report
The text was updated successfully, but these errors were encountered: