You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v4.x
v5.x
v6.x
Current Behavior
Unit tests in @ionic/vue error with the following:
FAIL tests/unit/example.spec.ts
● Test suite failed to run
/home/kensodemann/Projects/Home/test-vue/node_modules/@ionic/core/components/ion-accordion.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { attachShadow, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at Object.<anonymous> (node_modules/@ionic/vue/dist/index.js:13:25)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 3.251s, estimated 4s
Ran all test suites.
Expected Behavior
The tests not to fail...
Steps to Reproduce
ionic start test-vue tabs --type=vue
cd test-vue
npm run test:unit -- this one works
npm i @ioinc/{vue,vue-router}@next
`npm run test:unit' -- now it fails with error noted
Issue manifests with @ionic/vue and @ionic/react projects, but does not seem to affect @ionic/angular projects.
With React, the error is slightly different:
Details:
/home/kensodemann/Projects/Home/test-react/node_modules/@ionic/core/components/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
^^^^^^
SyntaxError: Unexpected token 'export'
at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
at Object.<anonymous> (node_modules/@ionic/react/dist/index.js:6:20)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.388 s, estimated 2 s
Ran all test suites.
The text was updated successfully, but these errors were encountered:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Prerequisites
Ionic Framework Version
Current Behavior
Unit tests in @ionic/vue error with the following:
Expected Behavior
The tests not to fail...
Steps to Reproduce
ionic start test-vue tabs --type=vue
cd test-vue
npm run test:unit
-- this one worksnpm i @ioinc/{vue,vue-router}@next
Code Reproduction URL
No response
Ionic Info
Additional Information
Issue manifests with
@ionic/vue
and@ionic/react
projects, but does not seem to affect@ionic/angular
projects.With React, the error is slightly different:
The text was updated successfully, but these errors were encountered: