Skip to content

Commit 0c1d2d8

Browse files
a-tarasyuktypescript-bot
authored andcommitted
Cherry-pick PR microsoft#39573 into release-3.9
Component commits: d1f8d0a fix(types/mocha): change deprecated Mocha types
1 parent c6f9343 commit 0c1d2d8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/testRunner/externalCompileRunner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Harness {
3030

3131
// eslint-disable-next-line @typescript-eslint/no-this-alias
3232
const cls = this;
33-
describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) {
33+
describe(`${this.kind()} code samples`, function (this: Mocha.Suite) {
3434
this.timeout(600_000); // 10 minutes
3535
for (const test of testList) {
3636
cls.runTest(typeof test === "string" ? test : test.file);
@@ -41,7 +41,7 @@ namespace Harness {
4141
// eslint-disable-next-line @typescript-eslint/no-this-alias
4242
const cls = this;
4343
const timeout = 600_000; // 10 minutes
44-
describe(directoryName, function (this: Mocha.ISuiteCallbackContext) {
44+
describe(directoryName, function (this: Mocha.Suite) {
4545
this.timeout(timeout);
4646
const cp: typeof import("child_process") = require("child_process");
4747

@@ -127,7 +127,7 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`;
127127

128128
// eslint-disable-next-line @typescript-eslint/no-this-alias
129129
const cls = this;
130-
describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) {
130+
describe(`${this.kind()} code samples`, function (this: Mocha.Suite) {
131131
this.timeout(cls.timeout); // 20 minutes
132132
before(() => {
133133
cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability

src/testRunner/rwcRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace RWC {
4747
caseSensitive = false;
4848
});
4949

50-
it("can compile", function (this: Mocha.ITestCallbackContext) {
50+
it("can compile", function (this: Mocha.Context) {
5151
this.timeout(800_000); // Allow long timeouts for RWC compilations
5252
let opts!: ts.ParsedCommandLine;
5353

@@ -145,7 +145,7 @@ namespace RWC {
145145
});
146146

147147

148-
it("has the expected emitted code", function (this: Mocha.ITestCallbackContext) {
148+
it("has the expected emitted code", function (this: Mocha.Context) {
149149
this.timeout(100_000); // Allow longer timeouts for RWC js verification
150150
Harness.Baseline.runMultifileBaseline(baseName, "", () => {
151151
return Harness.Compiler.iterateOutputs(compilerResult.js.values());

0 commit comments

Comments
 (0)