I tried installing a VS Code Jest extension and so...
# help
I tried installing a VS Code Jest extension and somewhere in the process, I can no longer run tests.
npm run test
npx sst test
both return the same error, “Unknown script test”. I’ve uninstalled the VSCode Jest extension, removed and reinstalled /node_modules and package-lock.json, restarted VSCode several times. Nothing seems to work. I am able to still run tests fine in another sst project. Anyone know how to get me back testing again?
Looks like someone on my team decided to upgrade SST to v1, where Jest was removed. I just need to set it up as a separate cli process. https://docs.serverless-stack.com/constructs/migration#jest-changelog
Hey @Bryan Campbell, yeah I was going to ask which version of SST r u using 😁
The reason we decided to remove the command because
sst test
did not add much value on top running
On the flip side,
sst test
doesn’t work well with certain
@thdxr knows more about it.
Were you able to hook up the npm script to run
Yes, I got it running. I’m also using TypeScript, so that added some complexity with babel and some other dependencies. But it is all working now. Thanks!