-
Notifications
You must be signed in to change notification settings - Fork 815
Closed
Labels
Description
Stencil version:
@stencil/[email protected]
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
I'm using a lib named Elix (https://component.kitchen/elix) and it works for npm start.
But I get an ERROR on npm-test:
SyntaxError: Cannot use import statement outside a module
2 | import { Model, Data, Element, Relation } from '../../global/model/index';
3 | import { MatchResults, RouterHistory } from '@stencil/router';
> 4 | import 'elix/define/Tabs'
| ^
5 |
6 |
7 | @Component({
sformer.js:537:17)
at ScriptTransformer.transform (xxxxxx/node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (src/components/app-home/app-home.tsx:4:1)
Expected behavior:
npm test doesn't fail
Steps to reproduce:
Create Stencil a default Project with "npm init stencil" and select app
Related code:
npm install elix
add to any of stencil component. E.g. app-home
import 'elix/define/Tabs'
run npm test
// insert any relevant code here
Other information:
I've searched throught stenciljs and jest documentation and tried to solve it by adding
testing: {
transformIgnorePatterns: ["/node_modules/", "/node_modules/elix/.*"]
}
to stencil.config.ts
glenveegee, chiyema, valk, julio8a, fredcido and 4 more