In this part, weβll look at all the NPM packages and config thatβs need to get a basic test environment running. By the end of it youβll know enoug...
For further actions, you may consider blocking this person and/or reporting abuse
I get this error when running "npm test".
Executing "e:<folder><app>\scripts\test":
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn e:<folder><app>\scripts\test ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! Test failed. See above for more details.
I can run both the commands in the script file without scripty.
I don't have rollup running my production builds (I use webpack), so I don't really need the if statement in the script.
Any suggestions?
Am I right in thinking youβre running on Windows? I took a look through the scripty Windows instructions but Iβm not sure any of it applies to your situation, other than ensuring the file is in fact executable.
What happens if you run
scripts/test
directly from the command line?Other than that Iβm not sure what to suggest. If you can get a minimal reproduction onto GitHub/GitLab/etc I can take a look.
I have this exact same issue. I cloned your repo to test if I did anything wrong, but I have the same issue with your code :/
I wonder if package updates have broken something. Iβll find some time later today to take a look at this again.
Thank you so much!
Are there any updates on this?
In the repo,
input: "spec/**/*.spec.js",
has been replaced with just the name of the single test. If I put the regex back I get the error messageCannot use import statement outside a module
when running the tests. There's no stack trace, so I'm not sure where this happens. Does anyone know a solution to this?Hey Daniel,
Thanks for the fabulous post! I'm loving Svelte and this has been a super helpful and interesting post.
I have two things that I had to change to get the code (as it is up to this point in the series) running with an empty test component:
Any insight on either of these items would be appreciated! Looking forward to the rest of the series.
Thanks!
Hello there,
Thanks for this great tutorial.
I have a problem, I get this error:
Active code page: 1252
-z was unexpected at this time.
npm ERR! Test failed. See above for more details.
Any ideas?
What -z means by the way? Is it batch script?
I am using windows 7
Hi Daniel!
Thank you a lot for this intro!
We built up a stack with this technologies:
Jest
Svelte 3
@testing-library/svelte
Typescript
Bootstrap 5
(rollup for bundling, not for tests)
node 16
In case anyone gets errors in their setup, here is a good thread to check: github.com/mihar-22/svelte-jester/...