Closed d2s closed 6 years ago
I have the exact same issue, haven't had time to dive deeper into it yet. Did you find a solution?
@rbeen No, I did not have time or energy to debug the issue.
It is (probably) caused by the changed internal structure of stencil core’s tests: https://github.com/ionic-team/stencil/tree/master/src/testing
Looking quickly, https://github.com/ionic-team/stencil/issues/272 issue might be related to this in some way, but not really sure about that. Anyway, Stencil core team should look at the issue in their side of things.
The error you are reporting looks more like this one: https://github.com/ionic-team/stencil/issues/288
I do not know if there has been a release with that fix in it or not yet.
@kensodemann @rbeen v0.0.8-0
was tagged as released 3 days ago.
package.json
of the stencil-app-starter
repository is pointing to a "next" version:
"dependencies": {
"@stencil/core": "next",
"@stencil/router": "latest"
},
When user runs npm update
on their local project directory, npm downloads the latest version of the Stencil core package.
❯ npm update
+ @types/jest@21.1.6
+ @stencil/core@0.0.8-0
removed 3 packages and updated 3 packages in 8.987s
After the update command, tests should now be able to finish properly.
❯ npm run test
> learning-stencil@0.0.3 test /[… path removed …]/learning-stencil
> jest --no-cache
PASS src/components/my-name/my-name.spec.ts
my-name
✓ should build (4ms)
rendering
✓ should work without parameters (1156ms)
✓ should work a first name (7ms)
✓ should work with a last name (3ms)
✓ should work with both a first and a list name (3ms)
Test Suites: 1 passed, 1 total
Tests: 5 passed, 5 total
Snapshots: 0 total
Time: 3.726s
Ran all test suites.
In overall, it looks that the issue is almost fixed.
People just have to run the update command manually, if they have older version of the core package installed on the project’s local npm dependencies.
Remaining part of the issue is that this starter project has outdated package-lock.json
version from one month ago. If that is not updated, some people will keep having issues with the Stencil core package.
Hello all! This has since been fixed and I can no longer reproduce in the latest version of this starter. Thanks for using Stencil!
Resources:
Stencil version: (
npm list @stencil/core
output below):I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request
Current behavior:
Tests fail to run by default, when running
npm run test
command.Expected behavior:
Default tests should run without errors.
Steps to reproduce:
npm run test
Related code:
Other information:
Using latest Node.js LTS version (via nvm, installed with the instructions available at a Gist page). Computer itself is running a recent version of macOS.