3.2.25 does not work with nyc
When I use esm together with nyc, mocha and ts-node (the project is written in TypeScript) all of my tests fail because it can't find my exported functions anymore: TypeError: <my-function> is not a function. When I run my tests without nyc it works fine. So the problem only occurs when I use nyc. The reason why I create this issue here and not at the nyc repository is that when I downgrade esm to 3.2.20 it works again. The issue only occurs when I use 3.2.25
I setup a small demo repository where you can reproduce the issue:
- clone and
yarn installthe repository -
yarn test:coveragegives you the errorTypeError: calc is not a function - downgrade
esmto3.2.20and run it again ➡️ it works without any errors
Is this maybe somehow related to https://github.com/standard-things/esm/issues/782 that's already closed?
With a little effort, you can find out exactly which commit was the first bad one (from the perspective of your application).
This information will greatly help maintainers understand the issue you're experiencing and will increase the odds of it getting resolved in a timely manner.
- Check out a copy of
esmsomewhere - Use
npm linkinesmfolder - In your project folder, run
npm link esm - In
esmfolder you can now usegit bisectto determine exactly which commit was the first bad one
See
- https://thoughtbot.com/blog/git-bisect
- https://flaviocopes.com/git-bisect/
Good luck!
nyc -r esm tape test doesn't collect coverage for me.
If I use babel-regsiter it collects coverage correctly 😕
nyc -r babel-regsiter tape test works.
Related PR: https://github.com/AndyOGo/stylelint-declaration-strict-value/pull/64
Alright downgrading esm to 3.2.20 works on my local machine, but not in Travis CI...