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 }) => {
7474 await waitForLogs (
7575 "[vite] invalidate /src/TitleWithExport.tsx: Could not Fast Refresh (export removed)" ,
7676 "[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 \) $ / ,
7878 ) ;
7979
8080 // Remove usage from App
Original file line number Diff line number Diff line change @@ -13,10 +13,16 @@ export const setupWaitForLogs = async (page: Page) => {
1313 page . on ( "console" , ( log ) => {
1414 logs . push ( log . text ( ) ) ;
1515 } ) ;
16- return ( ...messages : string [ ] ) =>
16+ return ( ...messages : ( string | RegExp ) [ ] ) =>
1717 expect
1818 . 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+ ) {
2026 logs = [ ] ;
2127 return true ;
2228 }
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module.exports.default = react;`,
5757 copyFileSync ( "README.md" , "dist/README.md" ) ;
5858
5959 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" ,
6161 { stdio : "inherit" } ,
6262 ) ;
6363
You can’t perform that action at this time.
0 commit comments