question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stencil: Running tests throws error

See original GitHub issue

Describe the bug Running tests throws the following error:

> nx run my-lib:test 
[25:42.9]  testing spec files
[25:42.9]  jest args: --projectType=library --tsConfig=libs/my-lib/tsconfig.lib.json
           --configPath=libs/my-lib/stencil.config.ts --outputPath=dist/libs/my-lib --spec --max-workers=8

[ ERROR ]  runJest: TypeError: Class extends value #<Object> is not a constructor or null

To Reproduce

  1. Create new library nx g @nxext/stencil:lib my-lib
  2. Run tests nx test my-lib

Expected behavior Run tests without error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DominikPiepercommented, Nov 9, 2021

I’ll close this @SebastianSchenk. I added your fix for the jest-config package to the init generator until it’s fixed in stencil side.

0reactions
DominikPiepercommented, Nov 8, 2021

Hopefully, that’s all obsolete after Stencil supports Jest 27 natively

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using jest-dom in StencilJS tests throws error - Stack Overflow
So my question is - is there a way to get jest-dom to work with StencilJS unit tests, as it appears that the...
Read more >
stencil/core does not throw error when missing jest/jest-cli ...
in Stencil v2.10.0, running stencil test --spec -e2e causes Stencil's testing 'task' to start up Jest. As a part of the process, Stencil...
Read more >
Unit Testing - Stencil.js
Stencil makes it easy to unit test components and app utility functions using Jest. Unit tests validate the code in isolation. Well written...
Read more >
Stencil Bundle throws error - BigCommerce Support
Stencil Bundle throws error. Hello,. I have tried running the theme locally and it works well. I have tested to create a custom...
Read more >
A Guide On Debugging Tests in Stencil - DEV Community ‍ ‍
When writing tests for a Stencil application, I found debugging tests a challenge, ... Or you're getting an error when running the tests....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found