chore: don't compile when running the _test script

This commit is contained in:
Zoltan Kochan
2020-05-05 23:03:01 +03:00
parent 7852deea3f
commit c63fac43c3
2 changed files with 4 additions and 9 deletions

View File

@@ -155,8 +155,8 @@
"test:tap": "cd ../.. && c8 --reporter lcov --reports-dir packages/pnpm/coverage ts-node packages/pnpm/test --type-check",
"pretest:e2e": "rimraf node_modules/.bin/pnpm",
"test:e2e": "registry-mock prepare && run-p -r registry-mock test:tap",
"_test": "pnpm run compile && cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e",
"test": "pnpm run _test",
"_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e",
"test": "pnpm run compile && pnpm run _test",
"prepublishOnly": "pnpm run compile && npm cache clear --force && publish-packed --prune",
"postpublish": "publish-packed",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build"

View File

@@ -76,13 +76,8 @@ async function updateManifest (dir: string, manifest: ProjectManifest) {
'test:e2e': 'registry-mock prepare && run-p -r registry-mock test:tap',
}
if (manifest.name === 'pnpm') {
scripts.test = 'pnpm run _test'
scripts._test = `pnpm run compile && cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e`
} else {
scripts.test = 'pnpm run compile && pnpm run _test'
scripts._test = `cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e`
}
scripts.test = 'pnpm run compile && pnpm run _test'
scripts._test = `cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e`
break
default:
if (await exists(path.join(dir, 'test'))) {