Skip to content

Commit

Permalink
chore: add comment to ts-expect-error (#13624)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade authored Feb 20, 2025
1 parent f42428a commit de28a47
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools/mocha-runner/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ function customBDDInterface(suite: Mocha.Suite) {
});
};

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// @ts-expect-error override the method to support custom functionality
context['describe'] = describe;

function it(title: string, fn: Mocha.TestFunction, itOnly = false) {
Expand All @@ -122,8 +121,7 @@ function customBDDInterface(suite: Mocha.Suite) {
test.parent = suite;

const describeOnly = Boolean(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// @ts-expect-error pokes at internal methods
suite.parent?._onlySuites.find(child => {
return child === suite;
}),
Expand Down Expand Up @@ -180,8 +178,7 @@ function customBDDInterface(suite: Mocha.Suite) {
it.deflake = wrapDeflake(it);
it.deflakeOnly = wrapDeflake(it.only);

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// @ts-expect-error override the method to support custom functionality
context.it = it;
},
);
Expand Down

0 comments on commit de28a47

Please sign in to comment.