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

tests: fix tests with npm7 #4892

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Conversation

AdamMajer
Copy link
Contributor

When run with npm 7.x, the unit tests fails with the error below.
To fix this, simply don't change the CWD when executing the tests

pm2@4.5.0 test
bash test/unit.sh && bash test/e2e.sh

[~] Starting test ./filter_env.mocha.js
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/adamm/work/node/pm2/pm2/test/programmatic/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/adamm/work/node/pm2/pm2/test/programmatic/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ---
License MIT
Doc PR https://github.com/pm2-hive/pm2-hive.github.io/pulls

When run with npm 7.x, the unit tests fails with the error below.
To fix this, simply don't change the CWD when executing the tests

> pm2@4.5.0 test
> bash test/unit.sh && bash test/e2e.sh

[~] Starting test ./filter_env.mocha.js
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/adamm/work/node/pm2/pm2/test/programmatic/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/adamm/work/node/pm2/pm2/test/programmatic/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
@CLAassistant
Copy link

CLAassistant commented Oct 26, 2020

CLA assistant check
All committers have signed the CLA.

@AdamMajer
Copy link
Contributor Author

FWIW, the "signed CLA" is not really "signed"... GitHub interface is complete junk for this --- "Sign in with GitHub to Continue" and never a confirmation..... so it's great :)

If you need CLA signed, it should be done by my company.

@Unitech Unitech merged commit 2ba6dff into Unitech:development Nov 5, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants