Skip to content

Commit 7ac96b1

Browse files
committed
test(jest): align env ctor and runner signature with installed Jest types for CI
1 parent dba304a commit 7ac96b1

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
1313
testPath: string | null = null;
1414

1515
constructor(config: any, context?: any) {
16-
super(config);
16+
super(config, context);
1717
this.testPath = context?.testPath ?? null;
1818
}
1919

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export function createTestRunner(): JestTestRunnerConstructor {
5656
override async runTests(
5757
tests: { context: any; path: string }[],
5858
watcher: any,
59-
onStart: any,
60-
onResult: any,
61-
onFailure: any,
6259
options: any,
6360
) {
6461
const env = process.env as d.E2EProcessEnv;
@@ -82,12 +79,12 @@ export function createTestRunner(): JestTestRunnerConstructor {
8279
setScreenshotEmulateData(emulateConfig, env);
8380

8481
// run the test for each emulate config
85-
await super.runTests(tests, watcher, onStart, onResult, onFailure, options);
82+
await super.runTests(tests, watcher, options);
8683
}
8784
} else {
8885
// not doing e2e screenshot tests
8986
// so just run each test once
90-
await super.runTests(tests, watcher, onStart, onResult, onFailure, options);
87+
await super.runTests(tests, watcher, options);
9188
}
9289
}
9390
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function createJestPuppeteerEnvironment(): JestPuppeteerEnvironmentConstr
1313
testPath: string | null = null;
1414

1515
constructor(config: any, context?: any) {
16-
super(config);
16+
super(config, context);
1717
this.testPath = context?.testPath ?? null;
1818
}
1919

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export function createTestRunner(): JestTestRunnerConstructor {
5656
override async runTests(
5757
tests: { context: any; path: string }[],
5858
watcher: any,
59-
onStart: any,
60-
onResult: any,
61-
onFailure: any,
6259
options: any,
6360
) {
6461
const env = process.env as d.E2EProcessEnv;
@@ -82,12 +79,12 @@ export function createTestRunner(): JestTestRunnerConstructor {
8279
setScreenshotEmulateData(emulateConfig, env);
8380

8481
// run the test for each emulate config
85-
await super.runTests(tests, watcher, onStart, onResult, onFailure, options);
82+
await super.runTests(tests, watcher, options);
8683
}
8784
} else {
8885
// not doing e2e screenshot tests
8986
// so just run each test once
90-
await super.runTests(tests, watcher, onStart, onResult, onFailure, options);
87+
await super.runTests(tests, watcher, options);
9188
}
9289
}
9390
}

0 commit comments

Comments
 (0)