-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
[testing] module first approach #52
Comments
so to not be dependent on webpack as a build tool... this means we should use a "native" es module version of chai. So basically add it to https://github.com/bundled-es-modules right? and then use that one instead of the "official" chai |
Yes if we want to stick to native es modules for everything we will need to do that. Alternatively we could check if express can be loaded with an import, and export from the window. |
I would say the more "correct" solution would be "native" es modules for chai itself. using it via some express magic feels like a workaround. We should do this for sinon then as well 💪 PS: just thinking using renovate auto merge + fully CD we should be able to get automatically new versions released (without any manual work)... uh that sounds like a good plan for bundled-es-modules |
Sinon 7 ships native es modules :D wct is still on sinon v1 haha. Are you able to make the es version of chai? Then ill work on the changes to the testing package |
uuhh nice - native es version 👍 sounds good will make it right now :) published name will be |
solved with latest release |
Currently our testing package relies on modifying globals. This makes tests non self contained and requires some magic to happen before test files are run, either in a parent index.html / index.js and/or requires test tool configuration.
My proposal is to go fully with modules, in your tests use:
import chai from '@open-wc/testing
which contains all the necessary plugins registered. The same goes for the automatic fixture cleanup, we could register this automatically when you create a fixture or also when you import chai.The text was updated successfully, but these errors were encountered: