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
test: Convert tests to ESM and upgrade Chai #297
base: master
Are you sure you want to change the base?
Conversation
Fixed by removing |
test/index.mjs
Outdated
global.chai = { | ||
...baseChai, | ||
...baseChai.use(chaiAsPromised), | ||
...baseChai.use(chaiHttp), | ||
...baseChai.use(chaiSpies), | ||
...baseChai.use(chaiChanges) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a workaround for chaijs/chai#1569, because imports are immutable.
f31ae89
to
e147b77
Compare
e147b77
to
eead64b
Compare
Convert all the tests to ESM (`.mjs`) in preparation for Chai 5, which drops support for CommonJS. - replace `require` with `import` throughout. - create a global `chai` object to replace the old `chai = require('chai')`. - rename tests from '.js' to '.mjs'.
eead64b
to
e9efdbd
Compare
ea8c18f
to
b6f6f85
Compare
Convert all the tests to ESM (
.mjs
) in preparation for Chai 5, which drops support for CommonJS.require
withimport
throughout.chai
object to replace the oldchai = require('chai')
..js
to.mjs
.chai-http
andchai-as-promised
, which aren't being used by any tests.chai
v5.1.0.