diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index 91f77faaf0d..1f2a6cb9ef2 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -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)); diff --git a/tests/baselines/reference/user/TypeScript-Vue-Starter.log b/tests/baselines/reference/user/TypeScript-Vue-Starter.log deleted file mode 100644 index 99bf7df534e..00000000000 --- a/tests/baselines/reference/user/TypeScript-Vue-Starter.log +++ /dev/null @@ -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: diff --git a/tests/cases/user/TypeScript-React-Starter/test.json b/tests/cases/user/TypeScript-React-Starter/test.json index caa97357cb7..98d38680468 100644 --- a/tests/cases/user/TypeScript-React-Starter/test.json +++ b/tests/cases/user/TypeScript-React-Starter/test.json @@ -1,4 +1,4 @@ { - "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter", + "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter.git", "types": ["jest", "node"] } diff --git a/tests/cases/user/TypeScript-Vue-Starter/test.json b/tests/cases/user/TypeScript-Vue-Starter/test.json index 4504c4c1cd5..ca7390f5639 100644 --- a/tests/cases/user/TypeScript-Vue-Starter/test.json +++ b/tests/cases/user/TypeScript-Vue-Starter/test.json @@ -1,4 +1,4 @@ { "cloneUrl": "https://github.com/Microsoft/TypeScript-Vue-Starter.git", - "types": [] + "types": ["jest"] } diff --git a/tests/cases/user/TypeScript-WeChat-Starter/test.json b/tests/cases/user/TypeScript-WeChat-Starter/test.json index 92c47595d1a..fbcd73f2c12 100644 --- a/tests/cases/user/TypeScript-WeChat-Starter/test.json +++ b/tests/cases/user/TypeScript-WeChat-Starter/test.json @@ -1,4 +1,4 @@ { - "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter", + "cloneUrl": "https://github.com/Microsoft/TypeScript-WeChat-Starter.git", "types": [] }