Skip to content

Commit 78fca43

Browse files
committed
Either clone or pull, don't do both
1 parent 70b902e commit 78fca43

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

src/testRunner/externalCompileRunner.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
5757
if (!fs.existsSync(submoduleDir)) {
5858
exec("git", ["clone", config.cloneUrl, directoryName], { cwd });
5959
}
60-
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
61-
exec("git", ["clean", "-f"], { cwd: submoduleDir });
62-
exec("git", ["pull", "-f"], { cwd: submoduleDir });
60+
else {
61+
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
62+
exec("git", ["clean", "-f"], { cwd: submoduleDir });
63+
exec("git", ["pull", "-f"], { cwd: submoduleDir });
64+
}
6365

6466
types = config.types;
6567

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Exit Code: 1
2+
Standard output:
3+
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.
4+
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.
5+
src/components/Hello.spec.ts(14,5): error TS2304: Cannot find name 'expect'.
6+
7+
8+
9+
Standard error:

tests/baselines/reference/user/TypeScript-WeChat-Starter.log

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
Exit Code: 1
22
Standard output:
3-
../../../../../node_modules/@types/mocha/index.d.ts(2680,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'beforeEach' must be of type 'Lifecycle', but here has type 'HookFunction'.
4-
../../../../../node_modules/@types/mocha/index.d.ts(2698,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'afterEach' must be of type 'Lifecycle', but here has type 'HookFunction'.
5-
../../../../../node_modules/@types/mocha/index.d.ts(2714,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'describe' must be of type 'Describe', but here has type 'SuiteFunction'.
6-
../../../../../node_modules/@types/mocha/index.d.ts(2735,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'xdescribe' must be of type 'Describe', but here has type 'PendingSuiteFunction'.
7-
../../../../../node_modules/@types/mocha/index.d.ts(2749,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'it' must be of type 'It', but here has type 'TestFunction'.
8-
../../../../../node_modules/@types/mocha/index.d.ts(2763,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'test' must be of type 'It', but here has type 'TestFunction'.
9-
../../../../../node_modules/@types/mocha/index.d.ts(2770,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'xit' must be of type 'It', but here has type 'PendingTestFunction'.
3+
src/App.test.tsx(5,1): 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.
4+
src/components/Hello.test.tsx(5,1): 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.
5+
src/components/Hello.test.tsx(7,3): error TS2304: Cannot find name 'expect'.
6+
src/components/Hello.test.tsx(10,1): 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.
7+
src/components/Hello.test.tsx(12,3): error TS2304: Cannot find name 'expect'.
8+
src/components/Hello.test.tsx(15,1): 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.
9+
src/components/Hello.test.tsx(17,3): error TS2304: Cannot find name 'expect'.
10+
src/components/Hello.test.tsx(20,1): 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.
11+
src/components/Hello.test.tsx(21,3): error TS2304: Cannot find name 'expect'.
12+
src/components/Hello.test.tsx(26,1): 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.
13+
src/components/Hello.test.tsx(27,3): error TS2304: Cannot find name 'expect'.
1014

1115

1216

tests/baselines/reference/user/puppeteer.log

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Exit Code: 1
22
Standard output:
3-
../../../../../node_modules/@types/gulp/index.d.ts(9,27): error TS2307: Cannot find module 'chokidar'.
43
lib/Accessibility.js(71,12): error TS2339: Property 'nodes' does not exist on type 'Promise<any>'.
54
lib/Accessibility.js(74,14): error TS2339: Property 'node' does not exist on type 'Promise<any>'.
65
lib/Accessibility.js(134,15): error TS2503: Cannot find namespace 'Protocol'.
@@ -204,7 +203,7 @@ lib/Page.js(384,9): error TS2339: Property 'cookies' does not exist on type 'Pro
204203
lib/Page.js(388,20): error TS2503: Cannot find namespace 'Protocol'.
205204
lib/Page.js(424,5): error TS2322: Type 'Promise<ElementHandle>' is not assignable to type 'ElementHandle'.
206205
lib/Page.js(432,5): error TS2322: Type 'Promise<ElementHandle>' is not assignable to type 'ElementHandle'.
207-
lib/Page.js(451,7): error TS2740: Type '(...args: any[]) => Promise<any>' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 242 more.
206+
lib/Page.js(451,7): error TS2740: Type '(...args: any[]) => Promise<any>' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 223 more.
208207
lib/Page.js(461,9): error TS2349: This expression is not callable.
209208
Type 'Window' has no call signatures.
210209
lib/Page.js(493,46): error TS2339: Property 'metrics' does not exist on type 'Promise<any>'.

0 commit comments

Comments
 (0)