-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug (possibly Sapper related)
mini project here:
cy-unti-test-test
- version: "cypress-svelte-unit-test": "^3.2.0",
- platform: Mac
- expected behavior: imports .svelte files for unit tests
- actual behavior: Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
Full error output:
Opening Cypress...
GET /__/ 200 6.226 ms - -
GET /__cypress/runner/cypress_runner.css 200 6.063 ms - -
GET /__cypress/runner/cypress_runner.js 200 5.018 ms - -
GET /__cypress/static/favicon.ico 200 0.986 ms - -
GET /__cypress/iframes/component/superlink.spec.js 200 3.118 ms - 872
GET /__cypress/runner/fonts/fa-solid-900.woff2 200 5.323 ms - 76120
(!) You have passed an unrecognized option
Unknown input options: client, server, serviceworker. Allowed options: acorn, acornInjectPlugins, cache, context, experimentalCacheExpiry, external, inlineDynamicImports, input, manualChunks, moduleContext, onwarn, perf, plugins, preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations, treeshake, watch
We currently have 1 warnings
(!) You have passed an unrecognized option
Unknown input options: client, server, serviceworker. Allowed options: acorn, acornInjectPlugins, cache, context, experimentalCacheExpiry, external, inlineDynamicImports, input, manualChunks, moduleContext, onwarn, perf, plugins, preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations, treeshake, watch
We currently have 1 warnings
{
code: 'ERROR',
error: Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
at error (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:217:30)
at Module.error (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:15145:16)
at tryParse (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:15034:23)
at Module.setSource (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:15435:30)
at ModuleLoader.addModuleSource (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:17429:20)
at async ModuleLoader.fetchModule (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:17490:9)
at async /Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:17460:36
at async Promise.all (index 0)
at async ModuleLoader.fetchModule (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:17491:9)
at async Promise.all (index 0)
at async Promise.all (index 0) {
code: 'PARSE_ERROR',
parserError: SyntaxError: Unexpected token (1:0)
at Object.pp$4.raise (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3922:13)
at Object.pp.unexpected (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:1703:8)
at Object.pp$3.parseExprAtom (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3321:10)
at Object.parseExprAtom (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:18500:75)
at Object.pp$3.parseExprSubscripts (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3133:19)
at Object.pp$3.parseMaybeUnary (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3110:17)
at Object.parseMaybeUnary (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:18414:29)
at Object.pp$3.parseExprOps (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3045:19)
at Object.pp$3.parseMaybeConditional (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3028:19)
at Object.pp$3.parseMaybeAssign (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:3001:19)
at Object.pp$3.parseExpression (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:2967:19)
at Object.pp$1.parseStatement (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:1891:45)
at Object.parseStatement (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:18522:22)
at Object.pp$1.parseTopLevel (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:1760:21)
at Object.parse (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:1560:15)
at Function.parse (/Users/self/src/cy-unit/node_modules/rollup/dist/shared/rollup.js:1583:35) {
pos: 0,
loc: [Position],
raisedAt: 1
},
pos: 0,
loc: {
column: 0,
file: '/Users/self/src/cy-unit/Superlink/Superlink.svelte',
line: 1
},
frame: `1: <script>\n ^\n2: export let href = "#";\n3: let slotContent = '';`,
watchFiles: [
'/Users/self/src/cy-unit/Superlink/superlink.spec.js',
'/Users/self/src/cy-unit/Superlink/Superlink.svelte'
]
}
}
GET /__cypress/tests?p=Superlink/superlink.spec.js 200 539.665 ms - 111
GET /__cypress/tests?p=cypress/support/index.js 200 548.126 ms - 232
GET /__cypress/iframes/component/superlink.spec.js 304 1.250 ms - -
GET /__cypress/tests?p=Superlink/superlink.spec.js 200 1.566 ms - 111
GET /__cypress/tests?p=cypress/support/index.js 200 2.817 ms - 232
GET /__cypress/runner/wasm/mappings.wasm 200 1.228 ms - -
I don't have the specialty to totally understand where the problem is here, but my guess is that something in the way Sapper serves up files cannot jive with the way this package imports .svelte files for testing.
Any help welcomed. Thanks in advance!
-adc
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working