Skip to content

Commit

Permalink
Cherry-pick PR #39573 into release-3.9 (#39602)
Browse files Browse the repository at this point in the history
Component commits:
d1f8d0a fix(types/mocha): change deprecated Mocha types

Co-authored-by: Alexander T <[email protected]>
  • Loading branch information
TypeScript Bot and a-tarasyuk authored Jul 14, 2020
1 parent c6f9343 commit 75d6648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/testRunner/externalCompileRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Harness {

// eslint-disable-next-line @typescript-eslint/no-this-alias
const cls = this;
describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) {
describe(`${this.kind()} code samples`, function (this: Mocha.Suite) {
this.timeout(600_000); // 10 minutes
for (const test of testList) {
cls.runTest(typeof test === "string" ? test : test.file);
Expand All @@ -41,7 +41,7 @@ namespace Harness {
// eslint-disable-next-line @typescript-eslint/no-this-alias
const cls = this;
const timeout = 600_000; // 10 minutes
describe(directoryName, function (this: Mocha.ISuiteCallbackContext) {
describe(directoryName, function (this: Mocha.Suite) {
this.timeout(timeout);
const cp: typeof import("child_process") = require("child_process");

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

// eslint-disable-next-line @typescript-eslint/no-this-alias
const cls = this;
describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) {
describe(`${this.kind()} code samples`, function (this: Mocha.Suite) {
this.timeout(cls.timeout); // 20 minutes
before(() => {
cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability
Expand Down
4 changes: 2 additions & 2 deletions src/testRunner/rwcRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace RWC {
caseSensitive = false;
});

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

Expand Down Expand Up @@ -145,7 +145,7 @@ namespace RWC {
});


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

0 comments on commit 75d6648

Please sign in to comment.