[testing] register chai plugins type error
See original GitHub issueHi!
Since the last minor version 2.3.0
, where there is an update of using chai plugins, it throws an error whenever you try to execute the tests with npm run test
command.
This is the error I mention:
TypeError: Cannot read property 'use' of undefined at Module../node_modules/@open-wc/testing/register-chai-plugins.js (http://localhost:9876/absoluteC:/Users/AppData/Local/Temp/_karma_webpack_/commons.js?75a6c001bc3dabe4571a9762f775846886fba511:27698:13) at __webpack_require__ (http://localhost:9876/absoluteC:/Users/AppData/Local/Temp/_karma_webpack_/runtime.js?c38d51cd4af62e9eacd04bb5dfbfbac27880397b:85:30) at Module../node_modules/@open-wc/testing/index.js
I do not know if there is any config missing I have to include due to this update, but it is failing when it tries to use those plugins as window.chai
seems not to be registered well.
This is the line I mention in register-chai-plugins.js
file: window.chai.use(chaiDomDiff);
Thanks in advance!!
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
if you are using
karma-webpack
you can try to addchai/chai.js
to your files in thekarma.conf.js
if that solves your problem would you be willing to add this information to our documentation via a PR? 🤗
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Open Web Components!