Chai v5 - Unknown file extension ".ts" when running with mocha v10 #1594
Replies: 2 comments 10 replies
-
im gonna guess its this: which you can see is different in the gist: afaik you can specify both if somehow you have a mix of cjs/esm sources too (the |
Beta Was this translation helpful? Give feedback.
-
Might help you. I've been fighting with this all evening and I finally got my version of things to work. https://github.com/glektarssza/gh-action-setup-odin/tree/b9261bb6ab4c769b125e08b451a1c0d88b5b89f7 The general gist of what I had to do was:
Given the massive headache this has been I'm probably going to look into a different assertion framework instead of Chai. It's just not worth it to throw an entire project into chaos because one package decided to move to ESM and only ESM. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've already checked this without success. I'd prefer not using the solution suggested by the author of that discussion, also I didn't understand well how to achieve it, but since it doesn't seem the right way, I'd prefer using a cleaner solution.
I've tried also doing changes using this gist but when I run
pnpm run test
ormocha
,mocha
fails in an unexpected way, like the command is called without some arguments.You can see my tests here: https://github.com/tsparticles/tsparticles/tree/v3/utils/tests (updated to v5 here https://github.com/tsparticles/tsparticles/tree/chai-v5/utils/tests)
And the failing error here: tsparticles/tsparticles#5277 in the failing GitHub Action
Can somebody help me fixing that?
For building the project (if needed):
First clone
v3
branch, it's more updated thanmain
once done this the first time, only
utils/tests
can be built usingpnpm run build
(it executes also the tests)The
chai
dependency is in the rootpackage.json
config.Beta Was this translation helpful? Give feedback.
All reactions