Skip to content
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

pem now seems to need dirty-chai, but isn't getting it #144

Closed
bajacondor opened this issue Sep 21, 2017 · 5 comments
Closed

pem now seems to need dirty-chai, but isn't getting it #144

bajacondor opened this issue Sep 21, 2017 · 5 comments

Comments

@bajacondor
Copy link

After updating to pem 1.11.0, I run my tests and they fail due to dirty-chai not being found. I traced it back to a transitive dependency of pem. Yet pem doesn't seem to load it.

@Dexus
Copy link
Owner

Dexus commented Sep 21, 2017

did you npm i in your own tests?

@KaiSchwarz-cnic
Copy link
Contributor

if you did npm i:
any software test should run in development area, and should not be available on production area. This then also includes the availability of packages used for automated tests like dirty-chai / chai / mocha / cross-env / nyc etc.
This means, only in case environment variable NODE_ENV is not set or is set to development, then npm will install these packages.

@bajacondor
Copy link
Author

Yes, I am running NODE_ENV=development npm install
And my test script also sets the NODE_ENV variable.
I am running Node v 8.5.0, npm v 5.3.0
This behavior seems to have just started with the upgrade of pem 1.11.0

@bajacondor
Copy link
Author

Actually, the problem seems to be that the pem tests are attempting to run when I run my tests... My test script runs with this command:
"test-unit": "NODE_ENV=development nyc --reporter=html ./node_modules/.bin/mocha './**/*.spec.js'"
Why would pem tests be running in this case?

@KaiSchwarz-cnic
Copy link
Contributor

I am sure, the problem is your npm script glob. './**/*.spec.js' also includes all *.spec.js files in node_modules folder. You can find ways here: mochajs/mocha#1577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants