This repository was archived by the owner on Jul 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ test("HMR invalidate", async ({ page }) => {
74
74
await waitForLogs (
75
75
"[vite] invalidate /src/TitleWithExport.tsx: Could not Fast Refresh (export removed)" ,
76
76
"[vite] hot updated: /src/App.tsx" ,
77
- "[hmr] Failed to reload /src/App.tsx. This could be due to syntax errors or importing non-existent modules. (see errors above)" ,
77
+ / F a i l e d t o r e l o a d \ /s r c \ /A p p \ .t s x . T h i s c o u l d b e d u e t o s y n t a x e r r o r s o r i m p o r t i n g n o n - e x i s t e n t m o d u l e s \. \ (s e e e r r o r s a b o v e \) $ / ,
78
78
) ;
79
79
80
80
// Remove usage from App
Original file line number Diff line number Diff line change @@ -13,10 +13,16 @@ export const setupWaitForLogs = async (page: Page) => {
13
13
page . on ( "console" , ( log ) => {
14
14
logs . push ( log . text ( ) ) ;
15
15
} ) ;
16
- return ( ...messages : string [ ] ) =>
16
+ return ( ...messages : ( string | RegExp ) [ ] ) =>
17
17
expect
18
18
. poll ( ( ) => {
19
- if ( messages . every ( ( m ) => logs . includes ( m ) ) ) {
19
+ if (
20
+ messages . every ( ( m ) =>
21
+ typeof m === "string"
22
+ ? logs . includes ( m )
23
+ : logs . some ( ( l ) => m . test ( l ) ) ,
24
+ )
25
+ ) {
20
26
logs = [ ] ;
21
27
return true ;
22
28
}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module.exports.default = react;`,
57
57
copyFileSync ( "README.md" , "dist/README.md" ) ;
58
58
59
59
execSync (
60
- "tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist --module es2020 --moduleResolution bundler" ,
60
+ "tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist --target es2020 -- module es2020 --moduleResolution bundler" ,
61
61
{ stdio : "inherit" } ,
62
62
) ;
63
63
You can’t perform that action at this time.
0 commit comments