Skip to content

Commit 9019bdb

Browse files
committed
[Tests] add a fake npm at the root to prevent the bin from being available
1 parent fba6a04 commit 9019bdb

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ matrix:
3232
env:
3333
install:
3434
- 'npm install'
35-
- 'npm run clean-local-npm'
3635
before_script:
3736
- 'npx lerna bootstrap'
3837
script:

env.js

-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ const packagesToRemove = [
107107
].map((s) => `./node_modules/${s}`);
108108

109109
const additionalDirsToRemove = [
110-
'node_modules/.bin/npm',
111-
'node_modules/.bin/npm.cmd',
112110
];
113111

114112
const rmrfs = []

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"description": "JavaScript Testing utilities for React",
66
"homepage": "https://enzymejs.github.io/enzyme/",
77
"scripts": {
8-
"clean-local-npm": "rimraf node_modules/.bin/npm node_modules/.bin/npm.cmd",
9-
"postinstall": "[ -n \"${TRAVIS-}\" ] || (npm run clean-local-npm && npm link npm && lerna bootstrap)",
8+
"postinstall": "[ -n \"${TRAVIS-}\" ] || (npm link npm && lerna bootstrap)",
109
"prepublish": "not-in-publish || (npm run build && safe-publish-latest)",
1110
"preversion": "npm run clean && npm run check",
1211
"postversion": "git push && git push --tags && npm run clean && npm run docs:publish",
@@ -93,6 +92,7 @@
9392
"lerna": "^2.11.0",
9493
"mocha": "^3.5.3",
9594
"mocha-lcov-reporter": "^1.3.0",
95+
"npm": "gist:9cdb687f3806f8e6cb8a365d0b7840eb",
9696
"nyc": "^10.3.2",
9797
"prop-types": "^15.7.2",
9898
"rimraf": "^2.7.1",

0 commit comments

Comments
 (0)