File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,14 @@ globalThis[globalPropertyName] = {
88 afterEach : globalThis . afterEach ,
99} ;
1010
11- window . before = ( ) => { } ;
12- window . beforeEach = ( ) => { } ;
13- window . after = ( ) => { } ;
14- window . afterEach = ( ) => { } ;
11+ /**
12+ * {} isn't strictly speaking a Mocha.Hook, so if Cypress decides to update their shipped Mocha
13+ * version to v11, which introduces #5231 [1], then this might become problematic. The
14+ * @types /mocha package did however update their types within its v10 line.
15+ *
16+ * [1] https://github.com/mochajs/mocha/issues/5231
17+ */
18+ window . before = ( ) => ( { } ) as Mocha . Hook ;
19+ window . beforeEach = ( ) => ( { } ) as Mocha . Hook ;
20+ window . after = ( ) => ( { } ) as Mocha . Hook ;
21+ window . afterEach = ( ) => ( { } ) as Mocha . Hook ;
You can’t perform that action at this time.
0 commit comments