test: Ignore the ~/.npmrc file during tests
When the test are run npm read the ~/.npmrc and ./.npmrc files and set some environment variables starting with `npm_`. When the test create temporary folders and created a `.npmrc` the values there are ignored as the environment variables take precedence. This commit remove this environment variable (from the local `process.env`) before starting the integrations test and restore them after. This way the `./.npmrc` files created in temp directory for the test are correctly used.
This commit is contained in:
@@ -21,6 +21,7 @@ install:
|
||||
- travis_retry npm install
|
||||
|
||||
script:
|
||||
- git config --get user.email
|
||||
- npm run test
|
||||
|
||||
after_success:
|
||||
|
||||
Reference in New Issue
Block a user