-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sapper(maybe?) throws Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) #110
Comments
The config in your example exports an object with 3 configs: 'client', 'server' and 'serviceWorker' which confused the Rollup loader. That's why you see the warning
Hmm, I need to think how to better solve this, or maybe someone can come up with an idea. A workaround would be to factor out the client Rollup config into a separate file and pass its filename like this issue has implemented bahmutov/cy-rollup#2 Or maybe |
it's fixed now, you pass a custom config, in which you only gives client section of the build for the tests |
Fantastic guys. I will test this out shortly. |
Still having this issue, not sure if the fix works
|
@TheBeachMaster I have the same error, did you find the solution? |
@vuonghungvinh I never managed to fix this, and now that Sapper has been deprecated in favor of Svelte Kit try using svelte-testing-library |
@TheBeachMaster Thank you |
Bug (possibly Sapper related)
mini project here:
cy-unti-test-test
Full error output:
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
The text was updated successfully, but these errors were encountered: