-
Notifications
You must be signed in to change notification settings - Fork 1
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
Investigate getting test specs to be able to use ESM import #16
Comments
That method has been working for standalone testing. Maybe a related issue is getting coverage working with nyc, mocha, and esm code. nyc also has a way to require esm, but I've had issues with it sometimes working, sometimes not, in the same repo, and no idea what changed. There may be some general pattern that helps with mocha and nyc. |
Also experiencing issues with coverage with nyc not working with bedrock-foo repos that are using esm module. It works sometimes and most of the times it doesn't work, and there are no errors. One of the examples would be https://github.com/digitalbazaar/bedrock-meter. When running the coverage script, it gives the following summary and in the report we can only see the index.js file.
Tried adding the nyc Some of the repos that might be impacted by this are:
|
I found this issue which gave me the idea that https://github.com/bcoe/c8 Which appears to be the case: This PR shows the necessary mods: https://app.codecov.io/gh/digitalbazaar/bedrock-meter/commits?page=1 |
This has been fixed, we can use ESM import now, closing. |
I spent some time looking into this and tried some things at the test suite level for a bedrock-module.
https://stackoverflow.com/a/60522428
According to that, we might just be able to call
mocha -r esm
hereThe text was updated successfully, but these errors were encountered: