File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/test-runner-chrome/src Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import { TestRunnerCoreConfig } from '@web/test-runner-core';
3
3
import { v8ToIstanbul } from '@web/test-runner-coverage-v8' ;
4
4
import { SessionResult } from '@web/test-runner-core' ;
5
5
6
+ declare global {
7
+ interface Window { __bringTabToFront : Function ; }
8
+ }
9
+
6
10
export class ChromeLauncherPage {
7
11
private config : TestRunnerCoreConfig ;
8
12
private testFiles : string [ ] ;
@@ -46,13 +50,10 @@ export class ChromeLauncherPage {
46
50
this . puppeteerPage . bringToFront ( ) ,
47
51
) ;
48
52
await this . puppeteerPage . evaluateOnNewDocument ( ( ) => {
49
- // @ts -ignore
50
- function patchFunction ( name , fn ) {
51
- // @ts -ignore
52
- window [ name ] = ( ...args ) => {
53
+ function patchFunction ( name : string , fn : Function ) {
54
+ ( window as any ) [ name ] = ( ...args : unknown [ ] ) => {
53
55
fn . call ( window , ...args ) ;
54
56
// Make sure that the tab running the test code is brought back to the front.
55
- // @ts -ignore
56
57
window . __bringTabToFront ( ) ;
57
58
} ;
58
59
}
You can’t perform that action at this time.
0 commit comments