Open bennypowers opened 4 years ago
@bennypowers this issue can be closed? From my @open-wc/testing/index.js
:
import chai, { expect, should, assert } from '@esm-bundle/chai';
import './register-chai-plugins.js';
export { chai, expect, should, assert };
When importing from
@open-wc/testing
, chai is automatically configured forkarma-esm
But if a user wants to apply their own chai plugins, they can experience failure in a few different ways:chai
member exported from@open-wc/testing
, if they try to import it andchai.use(myPlugin)
, it will fail. They will have towindow.chai.use(myPlugin)
instead.window.chai
, but they import that module before importing@open-wc/testing
, it will fail.I think the solution here is simply to document those things on https://open-wc.org/testing/testing.html#chai so that users who do want to use their own plugins will have some recourse.
We could also reconsider exporting
chai
from@open-wc/testing