Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types/mocha): change deprecated Mocha types #39573

Merged
merged 1 commit into from Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/testRunner/externalCompileRunner.ts
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
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