Running tests in the Svelte Typescript project does not fail due to compiler errors. #1623
Unanswered
CrowdHailer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've started a new project with the Svelte and typescript template.
I was just testing what help I would expect typescript to give me.
I have added this test
Note I have also turned on the strictNullChecks option in tsconfig.json.
When running npm test all the tests pass. However running
npm run build
fails because of the error of assigning undefined to the variable x.I'm curious how the typescript tests are being compiled without the error to then be run.
Should a type error fail the test process?
I'm also curious why the test files are being build when running
npm run build
it seems like they should not be needed in the build process.Should test files be transpiled as part of the build process?
Beta Was this translation helpful? Give feedback.
All reactions