serverless-bundle
serverless-bundle copied to clipboard
VS Code "Unexpected token import"
Hello,
Probably this is trivial but I don't know how to handle that.
When running npm test
tests pass, however, jest plugin for VS Code fails with
SyntaxError: Unexpected token import
.
I think Orta's Jest plugin for VS Code can't figure out to use babel-jest.
What should I do to make it work?
Hmmm I'm actually not sure about this. I don't have a lot of experience with VSCode. The npm test
command internally runs serverless-bundle test
. Do you know what the Jest plugin is doing?
Make sure your test config as documented in serverles-bundle:
To run your tests using the same Babel config used in the plugin add the following to your package.json:
"scripts": { "test": "serverless-bundle test" }
Hi @jayair this issue probably be closed.