Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mocha 9 #65

Closed
aabmass opened this issue Sep 28, 2021 · 5 comments
Closed

Support mocha 9 #65

aabmass opened this issue Sep 28, 2021 · 5 comments

Comments

@aabmass
Copy link

aabmass commented Sep 28, 2021

And any plans to support mocha 9?
npm WARN ts-mocha@9.0.0-alpha1 requires a peer of mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X but none is installed. You must install peer dependencies yourself.

Originally posted by @teolag in #61 (comment)

@beenotung
Copy link

My guess is ts-mocha is not affected by the breaking changes introduced in mocha@9.

Can we include || ^9.X.X in the peer dependency list of ts-mocha?

https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes

@Pitasi
Copy link

Pitasi commented Oct 19, 2021

My guess is ts-mocha is not affected by the breaking changes introduced in mocha@9.

Can we include || ^9.X.X in the peer dependency list of ts-mocha?

https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes

mocha@9 became an ESM module. ts-mocha may need some tweaks to make ts-node work with es modules (ESM): TypeStrong/ts-node#1007 (comment)

@jordaaash
Copy link

FWIW, here's a configuration for Mocha, TypeScript, and ESM that finally worked for me:
https://gist.github.com/jordansexton/2a0c3c360aa700cc9528e89620e82c3d

"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"] was the clincher.

@juergba
Copy link

juergba commented Nov 21, 2021

mocha@9 became an ESM module.

This is incorrect, Mocha@9 still is a CommonJS module.

@piotrwitek
Copy link
Owner

Released a new version of ts-mocha@9, please test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants