mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-23 10:29:01 -06:00
Don't npm install the parent project with no args (#35359)
This commit is contained in:
parent
2b64731a97
commit
bf370659b3
@ -81,7 +81,9 @@ namespace Harness {
|
||||
if (types) {
|
||||
args.push("--types", types.join(","));
|
||||
// Also actually install those types (for, eg, the js projects which need node)
|
||||
exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
|
||||
if (types.length) {
|
||||
exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
|
||||
}
|
||||
}
|
||||
args.push("--noEmit");
|
||||
Baseline.runBaseline(`${cls.kind()}/${directoryName}.log`, cls.report(cp.spawnSync(`node`, args, { cwd, timeout, shell: true }), cwd));
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
Exit Code: 1
|
||||
Standard output:
|
||||
src/components/Hello.spec.ts(4,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
|
||||
src/components/Hello.spec.ts(5,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
|
||||
src/components/Hello.spec.ts(14,5): error TS2304: Cannot find name 'expect'.
|
||||
|
||||
|
||||
|
||||
Standard error:
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter",
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter.git",
|
||||
"types": ["jest", "node"]
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-Vue-Starter.git",
|
||||
"types": []
|
||||
"types": ["jest"]
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter",
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-WeChat-Starter.git",
|
||||
"types": []
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user