Skip to content

Commit 8ef9648

Browse files
committed
test(jest): drop override modifiers due to widened base type in envs (fix TS4113)
1 parent 8439734 commit 8ef9648

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/testing/jest/jest-28/jest-environment.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { JestPuppeteerEnvironmentConstructor } from '../jest-apis';
88
export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstructor {
99
const BaseEnv = NodeEnvironment as unknown as new (...args: any[]) => any;
1010
const JestEnvironment = class extends BaseEnv {
11-
override global: JestGlobal.Global & JestEnvironmentGlobal;
11+
global: JestGlobal.Global & JestEnvironmentGlobal;
1212
browser: any = null;
1313
pages: any[] = [];
1414
testPath: string | null = null;
@@ -18,7 +18,7 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
1818
this.testPath = context?.testPath ?? null;
1919
}
2020

21-
override async setup() {
21+
async setup() {
2222
if ((process.env as E2EProcessEnv).__STENCIL_E2E_TESTS__ === 'true') {
2323
this.global.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this);
2424
this.global.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this);
@@ -89,14 +89,14 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
8989
this.pages.length = 0;
9090
}
9191

92-
override async teardown() {
92+
async teardown() {
9393
await super.teardown();
9494
await this.closeOpenPages();
9595
await disconnectBrowser(this.browser);
9696
this.browser = null;
9797
}
9898

99-
override getVmContext() {
99+
getVmContext() {
100100
return super.getVmContext();
101101
}
102102
};

src/testing/jest/jest-29/jest-environment.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { JestPuppeteerEnvironmentConstructor } from '../jest-apis';
88
export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstructor {
99
const BaseEnv = NodeEnvironment as unknown as new (...args: any[]) => any;
1010
const JestEnvironment = class extends BaseEnv {
11-
override global: JestGlobal.Global & JestEnvironmentGlobal;
11+
global: JestGlobal.Global & JestEnvironmentGlobal;
1212
browser: any = null;
1313
pages: any[] = [];
1414
testPath: string | null = null;
@@ -18,7 +18,7 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
1818
this.testPath = context?.testPath ?? null;
1919
}
2020

21-
override async setup() {
21+
async setup() {
2222
if ((process.env as E2EProcessEnv).__STENCIL_E2E_TESTS__ === 'true') {
2323
this.global.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this);
2424
this.global.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this);
@@ -89,14 +89,14 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
8989
this.pages.length = 0;
9090
}
9191

92-
override async teardown() {
92+
async teardown() {
9393
await super.teardown();
9494
await this.closeOpenPages();
9595
await disconnectBrowser(this.browser);
9696
this.browser = null;
9797
}
9898

99-
override getVmContext() {
99+
getVmContext() {
100100
return super.getVmContext();
101101
}
102102
};

0 commit comments

Comments
 (0)