Skip to content

Commit

Permalink
fix: wait 500ms after vite connected
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg committed May 4, 2024
1 parent 088b949 commit bd8af4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/e2e-tests/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ export async function waitForViteConnect(page: Page, timeoutMS = 5000) {
pageConsoleListener = (data) => {
const text = data.text();
if (text.indexOf('[vite] connected.') > -1) {
resolve();
// TODO: this is a test to see if it becomes more reliable
// if thats the case, we have to update the logic here to use a later signal/event than connected log
setTimeout(() => resolve(), 500);
}
};
page.on('console', pageConsoleListener);
Expand Down

0 comments on commit bd8af4b

Please sign in to comment.