Skip to content

Commit 66d6e5e

Browse files
authored
Remove leveldown, stip absolute paths from test mk 2, accept reordered and new user baselines (#24227)
1 parent d82d35c commit 66d6e5e

File tree

9 files changed

+80
-101
lines changed

9 files changed

+80
-101
lines changed

src/harness/externalCompileRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`;
112112
* This is problematic for error baselines, so we grep for them and strip them out.
113113
*/
114114
function stripAbsoluteImportPaths(result: string) {
115+
const workspaceRegexp = new RegExp(Harness.IO.getWorkspaceRoot().replace(/\\/g, "\\\\"), "g");
115116
return result
116117
.replace(/import\(".*?\/tests\/cases\/user\//g, `import("/`)
117118
.replace(/Module '".*?\/tests\/cases\/user\//g, `Module '"/`)
118-
.replace(/import\(".*?\/TypeScript\/node_modules\//g, `import("../../../node_modules`)
119-
.replace(/Module '".*?\/TypeScript\/node_modules\//g, `Module '"../../../node_modules`);
119+
.replace(workspaceRegexp, "../../..");
120120
}
121121

122122
function sortErrors(result: string) {

tests/baselines/reference/user/async.log

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ node_modules/async/auto.js(159,18): error TS2695: Left side of comma operator is
4343
node_modules/async/auto.js(159,50): error TS2695: Left side of comma operator is unused and has no side effects.
4444
node_modules/async/autoInject.js(44,17): error TS2695: Left side of comma operator is unused and has no side effects.
4545
node_modules/async/autoInject.js(134,6): error TS2695: Left side of comma operator is unused and has no side effects.
46-
node_modules/async/autoInject.js(136,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
4746
node_modules/async/autoInject.js(136,25): error TS2532: Object is possibly 'undefined'.
47+
node_modules/async/autoInject.js(136,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
4848
node_modules/async/autoInject.js(136,26): error TS2695: Left side of comma operator is unused and has no side effects.
4949
node_modules/async/autoInject.js(139,14): error TS2695: Left side of comma operator is unused and has no side effects.
5050
node_modules/async/autoInject.js(160,28): error TS2695: Left side of comma operator is unused and has no side effects.
@@ -145,9 +145,9 @@ node_modules/async/dist/async.js(2963,25): error TS2722: Cannot invoke an object
145145
node_modules/async/dist/async.js(2970,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
146146
node_modules/async/dist/async.js(2971,28): error TS2722: Cannot invoke an object which is possibly 'undefined'.
147147
node_modules/async/dist/async.js(3005,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
148+
node_modules/async/dist/async.js(3008,9): error TS2532: Object is possibly 'undefined'.
148149
node_modules/async/dist/async.js(3008,9): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
149150
Type 'undefined' is not assignable to type 'Function'.
150-
node_modules/async/dist/async.js(3008,9): error TS2532: Object is possibly 'undefined'.
151151
node_modules/async/dist/async.js(3081,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
152152
node_modules/async/dist/async.js(3086,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
153153
node_modules/async/dist/async.js(3087,28): error TS2722: Cannot invoke an object which is possibly 'undefined'.
@@ -175,18 +175,18 @@ node_modules/async/dist/async.js(4153,14): error TS2339: Property 'unshift' does
175175
node_modules/async/dist/async.js(4367,5): error TS2322: Type 'any[] | {}' is not assignable to type 'any[]'.
176176
Type '{}' is not assignable to type 'any[]'.
177177
Property 'flatMap' is missing in type '{}'.
178+
node_modules/async/dist/async.js(4603,17): error TS2532: Object is possibly 'undefined'.
178179
node_modules/async/dist/async.js(4603,17): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
179180
Type 'undefined' is not assignable to type 'Function'.
180-
node_modules/async/dist/async.js(4603,17): error TS2532: Object is possibly 'undefined'.
181181
node_modules/async/dist/async.js(4917,19): error TS2339: Property 'code' does not exist on type 'Error'.
182182
node_modules/async/dist/async.js(4919,23): error TS2339: Property 'info' does not exist on type 'Error'.
183183
node_modules/async/dist/async.js(5090,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
184184
node_modules/async/dist/async.js(5146,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
185185
node_modules/async/dist/async.js(5165,20): error TS2339: Property 'unmemoized' does not exist on type 'Function'.
186186
node_modules/async/dist/async.js(5208,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
187+
node_modules/async/dist/async.js(5211,9): error TS2532: Object is possibly 'undefined'.
187188
node_modules/async/dist/async.js(5211,9): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
188189
Type 'undefined' is not assignable to type 'Function'.
189-
node_modules/async/dist/async.js(5211,9): error TS2532: Object is possibly 'undefined'.
190190
node_modules/async/dist/async.js(5315,20): error TS2532: Object is possibly 'undefined'.
191191
node_modules/async/dist/async.js(5315,20): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
192192
Type 'undefined' is not assignable to type 'Function'.
@@ -240,8 +240,8 @@ node_modules/async/eachSeries.js(28,12): error TS2304: Cannot find name 'AsyncFu
240240
node_modules/async/eachSeries.js(36,20): error TS2695: Left side of comma operator is unused and has no side effects.
241241
node_modules/async/ensureAsync.js(34,12): error TS2304: Cannot find name 'AsyncFunction'.
242242
node_modules/async/ensureAsync.js(36,14): error TS2304: Cannot find name 'AsyncFunction'.
243-
node_modules/async/ensureAsync.js(56,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
244243
node_modules/async/ensureAsync.js(56,9): error TS2532: Object is possibly 'undefined'.
244+
node_modules/async/ensureAsync.js(56,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
245245
node_modules/async/ensureAsync.js(56,10): error TS2695: Left side of comma operator is unused and has no side effects.
246246
node_modules/async/ensureAsync.js(57,13): error TS2695: Left side of comma operator is unused and has no side effects.
247247
node_modules/async/ensureAsync.js(62,18): error TS2695: Left side of comma operator is unused and has no side effects.

0 commit comments

Comments
 (0)