Module parse failed: Unexpected token in Vue Test #21461
Unanswered
svelver
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to run a simple test for my Vue project in Cypress (
./cypress/integration/simple.spec.ts
)I want to import and use scripts from my
./src
folder. This particular test uses the helper script./src/demo.ts
:When I run the test, Cypress throws the following error message:
Interestingly, if I comment out the class stuff (lines 5-7) in
demo.ts
, no error is thrown.Webpack for Cypress is configured in
./cypress/plugins/index.js
like so (taken from here):It seems like the TypeScript loader is not configured correctly but I can't interfere with it, since it is automatically loaded from the vue cli service (btw.
vue-cli-service serve
works perfectly fine).This is my config file for TypeScript (
./cypress/tsconfig.json
):These are the dependencies from
./package.json
:Any help would be very much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions