Skip to content

Commit db68075

Browse files
authored
Add create-react-app and puppeteer user tests (microsoft#23471)
* Add create-react-app * Add puppeteer Everything is broken now. I am going back to master to see if that fixes things. * Add puppeteer baseline * Add chalk override (gitignore was ignoring it)
1 parent d009d8e commit db68075

File tree

11 files changed

+216
-60
lines changed

11 files changed

+216
-60
lines changed

.gitmodules

+7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
path = tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
1919
url = https://github.com/Microsoft/TypeScript-WeChat-Starter.git
2020
ignore = all
21+
[submodule "tests/cases/user/create-react-app/create-react-app"]
22+
path = tests/cases/user/create-react-app/create-react-app
23+
url = https://github.com/facebook/create-react-app.git
24+
ignore = all
2125
[submodule "tests/cases/user/webpack/webpack"]
2226
path = tests/cases/user/webpack/webpack
2327
url = https://github.com/webpack/webpack.git
2428
ignore = all
29+
[submodule "tests/cases/user/puppeteer/puppeteer"]
30+
path = tests/cases/user/puppeteer/puppeteer
31+
url = https://github.com/GoogleChrome/puppeteer.git

src/harness/externalCompileRunner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
6666
if (fs.existsSync(path.join(cwd, "node_modules"))) {
6767
require("del").sync(path.join(cwd, "node_modules"), { force: true });
6868
}
69-
const install = cp.spawnSync(`npm`, ["i"], { cwd, timeout: timeout / 2, shell: true, stdio }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
69+
const install = cp.spawnSync(`npm`, ["i", "--ignore-scripts"], { cwd, timeout: timeout / 2, shell: true, stdio }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
7070
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed: ${install.stderr.toString()}`);
7171
}
7272
const args = [path.join(__dirname, "tsc.js")];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Exit Code: 1
2+
Standard output:
3+
packages/babel-preset-react-app/dependencies.js(38,17): error TS2307: Cannot find module '@babel/preset-env'.
4+
packages/babel-preset-react-app/dependencies.js(49,17): error TS2307: Cannot find module '@babel/preset-env'.
5+
packages/babel-preset-react-app/index.js(52,17): error TS2307: Cannot find module '@babel/preset-env'.
6+
packages/babel-preset-react-app/index.js(61,17): error TS2307: Cannot find module '@babel/preset-env'.
7+
packages/babel-preset-react-app/index.js(74,17): error TS2307: Cannot find module '@babel/preset-react'.
8+
packages/babel-preset-react-app/index.js(84,33): error TS2307: Cannot find module '@babel/preset-flow'.
9+
packages/babel-preset-react-app/index.js(89,15): error TS2307: Cannot find module 'babel-plugin-macros'.
10+
packages/babel-preset-react-app/index.js(93,15): error TS2307: Cannot find module '@babel/plugin-transform-destructuring'.
11+
packages/babel-preset-react-app/index.js(98,17): error TS2307: Cannot find module '@babel/plugin-proposal-class-properties'.
12+
packages/babel-preset-react-app/index.js(107,17): error TS2307: Cannot find module '@babel/plugin-proposal-object-rest-spread'.
13+
packages/babel-preset-react-app/index.js(114,17): error TS2307: Cannot find module '@babel/plugin-transform-runtime'.
14+
packages/babel-preset-react-app/index.js(123,17): error TS2307: Cannot find module 'babel-plugin-transform-react-remove-prop-types'.
15+
packages/babel-preset-react-app/index.js(130,17): error TS2307: Cannot find module '@babel/plugin-transform-regenerator'.
16+
packages/babel-preset-react-app/index.js(137,15): error TS2307: Cannot find module '@babel/plugin-syntax-dynamic-import'.
17+
packages/babel-preset-react-app/index.js(140,17): error TS2307: Cannot find module 'babel-plugin-transform-dynamic-import'.
18+
packages/confusing-browser-globals/test.js(14,1): error TS2304: Cannot find name 'it'.
19+
packages/confusing-browser-globals/test.js(15,3): error TS2304: Cannot find name 'expect'.
20+
packages/confusing-browser-globals/test.js(18,1): error TS2304: Cannot find name 'it'.
21+
packages/confusing-browser-globals/test.js(19,3): error TS2304: Cannot find name 'expect'.
22+
packages/create-react-app/createReactApp.js(37,37): error TS2307: Cannot find module 'validate-npm-package-name'.
23+
packages/create-react-app/createReactApp.js(47,24): error TS2307: Cannot find module 'tar-pack'.
24+
packages/create-react-app/createReactApp.js(49,28): error TS2307: Cannot find module 'hyperquest'.
25+
packages/create-react-app/createReactApp.js(50,25): error TS2307: Cannot find module 'envinfo'.
26+
packages/create-react-app/createReactApp.js(52,30): error TS2307: Cannot find module 'react-dev-utils/workspaceUtils'.
27+
packages/create-react-app/createReactApp.js(53,29): error TS2307: Cannot find module './package.json'.
28+
packages/create-react-app/createReactApp.js(771,20): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
29+
Type 'undefined' is not assignable to type 'string'.
30+
packages/create-react-app/index.js(45,5): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
31+
packages/eslint-config-react-app/index.js(24,33): error TS2307: Cannot find module 'confusing-browser-globals'.
32+
packages/react-dev-utils/FileSizeReporter.js(13,24): error TS2307: Cannot find module 'filesize'.
33+
packages/react-dev-utils/FileSizeReporter.js(14,25): error TS2307: Cannot find module 'recursive-readdir'.
34+
packages/react-dev-utils/FileSizeReporter.js(16,24): error TS2307: Cannot find module 'gzip-size'.
35+
packages/react-dev-utils/WebpackDevServerUtils.js(9,25): error TS2307: Cannot find module 'address'.
36+
packages/react-dev-utils/WebpackDevServerUtils.js(14,24): error TS2307: Cannot find module 'detect-port-alt'.
37+
packages/react-dev-utils/WebpackDevServerUtils.js(15,24): error TS2307: Cannot find module 'is-root'.
38+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(12,1): error TS2304: Cannot find name 'describe'.
39+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(13,3): error TS2304: Cannot find name 'it'.
40+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(18,5): error TS2304: Cannot find name 'expect'.
41+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(19,5): error TS2304: Cannot find name 'expect'.
42+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(22,3): error TS2304: Cannot find name 'it'.
43+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(26,5): error TS2304: Cannot find name 'expect'.
44+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(29,3): error TS2304: Cannot find name 'it'.
45+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(36,5): error TS2304: Cannot find name 'expect'.
46+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(37,5): error TS2304: Cannot find name 'expect'.
47+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(40,3): error TS2304: Cannot find name 'it'.
48+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(46,5): error TS2304: Cannot find name 'expect'.
49+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(49,3): error TS2304: Cannot find name 'it'.
50+
packages/react-dev-utils/__tests__/ignoredFiles.test.js(53,5): error TS2304: Cannot find name 'expect'.
51+
packages/react-dev-utils/browsersHelper.js(9,30): error TS2307: Cannot find module 'browserslist'.
52+
packages/react-dev-utils/browsersHelper.js(13,23): error TS2307: Cannot find module 'pkg-up'.
53+
packages/react-dev-utils/browsersHelper.js(59,22): error TS2554: Expected 1 arguments, but got 0.
54+
packages/react-dev-utils/browsersHelper.js(61,36): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'.
55+
packages/react-dev-utils/browsersHelper.js(97,25): error TS2538: Type 'undefined' cannot be used as an index type.
56+
packages/react-dev-utils/checkRequiredFiles.js(19,34): error TS2339: Property 'F_OK' does not exist on type 'typeof import("fs")'.
57+
packages/react-dev-utils/checkRequiredFiles.js(23,32): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'.
58+
packages/react-dev-utils/checkRequiredFiles.js(24,34): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'.
59+
packages/react-dev-utils/getProcessForPort.js(29,6): error TS2339: Property 'split' does not exist on type 'Buffer'.
60+
packages/react-dev-utils/getProcessForPort.js(49,21): error TS2339: Property 'replace' does not exist on type 'Buffer'.
61+
packages/react-dev-utils/getProcessForPort.js(63,5): error TS2339: Property 'trim' does not exist on type 'Buffer'.
62+
packages/react-dev-utils/openBrowser.js(13,19): error TS2307: Cannot find module 'opn'.
63+
packages/react-dev-utils/webpackHotDevClient.js(19,22): error TS2307: Cannot find module 'sockjs-client'.
64+
packages/react-dev-utils/webpackHotDevClient.js(24,28): error TS2307: Cannot find module 'react-error-overlay'.
65+
packages/react-dev-utils/webpackHotDevClient.js(31,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'.
66+
packages/react-dev-utils/webpackHotDevClient.js(33,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'.
67+
packages/react-dev-utils/webpackHotDevClient.js(35,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'.
68+
packages/react-dev-utils/webpackHotDevClient.js(53,12): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
69+
packages/react-dev-utils/webpackHotDevClient.js(53,33): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
70+
packages/react-dev-utils/webpackHotDevClient.js(54,10): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
71+
packages/react-dev-utils/webpackHotDevClient.js(223,40): error TS2304: Cannot find name '__webpack_hash__'.
72+
packages/react-dev-utils/webpackHotDevClient.js(228,17): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
73+
packages/react-dev-utils/webpackHotDevClient.js(233,15): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
74+
packages/react-dev-utils/webpackHotDevClient.js(261,23): error TS2339: Property 'hot' does not exist on type 'NodeModule'.
75+
packages/react-dev-utils/workspaceUtils.js(11,25): error TS2307: Cannot find module 'find-pkg'.
76+
77+
78+
79+
Standard error:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Exit Code: 1
2+
Standard output:
3+
lib/Coverage.js(109,15): error TS2503: Cannot find namespace 'Protocol'.
4+
lib/Coverage.js(196,15): error TS2503: Cannot find namespace 'Protocol'.
5+
lib/ElementHandle.js(24,15): error TS2503: Cannot find namespace 'Protocol'.
6+
lib/ElementHandle.js(83,29): error TS2503: Cannot find namespace 'Protocol'.
7+
lib/EmulationManager.js(36,16): error TS2503: Cannot find namespace 'Protocol'.
8+
lib/ExecutionContext.js(22,15): error TS2503: Cannot find namespace 'Protocol'.
9+
lib/ExecutionContext.js(132,15): error TS2503: Cannot find namespace 'Protocol'.
10+
lib/FrameManager.js(28,15): error TS2503: Cannot find namespace 'Protocol'.
11+
lib/FrameManager.js(54,15): error TS2503: Cannot find namespace 'Protocol'.
12+
lib/FrameManager.js(76,15): error TS2503: Cannot find namespace 'Protocol'.
13+
lib/FrameManager.js(127,15): error TS2503: Cannot find namespace 'Protocol'.
14+
lib/FrameManager.js(773,15): error TS2503: Cannot find namespace 'Protocol'.
15+
lib/NetworkManager.js(129,15): error TS2503: Cannot find namespace 'Protocol'.
16+
lib/NetworkManager.js(174,15): error TS2503: Cannot find namespace 'Protocol'.
17+
lib/NetworkManager.js(207,15): error TS2503: Cannot find namespace 'Protocol'.
18+
lib/NetworkManager.js(224,15): error TS2503: Cannot find namespace 'Protocol'.
19+
lib/NetworkManager.js(256,15): error TS2503: Cannot find namespace 'Protocol'.
20+
lib/NetworkManager.js(270,15): error TS2503: Cannot find namespace 'Protocol'.
21+
lib/NetworkManager.js(286,15): error TS2503: Cannot find namespace 'Protocol'.
22+
lib/NetworkManager.js(313,15): error TS2503: Cannot find namespace 'Protocol'.
23+
lib/NetworkManager.js(640,13): error TS2503: Cannot find namespace 'Protocol'.
24+
lib/Page.js(66,15): error TS2503: Cannot find namespace 'Protocol'.
25+
lib/Page.js(185,15): error TS2503: Cannot find namespace 'Protocol'.
26+
lib/Page.js(394,22): error TS2503: Cannot find namespace 'Protocol'.
27+
lib/Page.js(407,15): error TS2503: Cannot find namespace 'Protocol'.
28+
lib/Page.js(731,19): error TS2503: Cannot find namespace 'Protocol'.
29+
lib/externs.d.ts(16,26): error TS2503: Cannot find namespace 'Protocol'.
30+
lib/externs.d.ts(16,69): error TS2503: Cannot find namespace 'Protocol'.
31+
lib/externs.d.ts(17,28): error TS2503: Cannot find namespace 'Protocol'.
32+
lib/externs.d.ts(17,81): error TS2503: Cannot find namespace 'Protocol'.
33+
lib/externs.d.ts(17,121): error TS2503: Cannot find namespace 'Protocol'.
34+
lib/helper.js(59,15): error TS2503: Cannot find namespace 'Protocol'.
35+
lib/helper.js(77,15): error TS2503: Cannot find namespace 'Protocol'.
36+
lib/helper.js(101,15): error TS2503: Cannot find namespace 'Protocol'.
37+
38+
39+
40+
Standard error:

0 commit comments

Comments
 (0)