Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Oct 19, 2023
1 parent de53a39 commit b609df2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion playground/spa/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineConfig(() => ({
define: {
haha: JSON.stringify('custom define!'),
app: JSON.stringify({ hello: 'world' }),
__REACT_DEVTOOLS_GLOBAL_HOOK__: JSON.stringify('({ isDisabled: true })'),
},
plugins: [
react(),
Expand Down
4 changes: 2 additions & 2 deletions playground/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ beforeAll(async (s) => {

return async () => {
serverLogs.length = 0
browserLogs.length = 0
await page?.close()
await server?.close()
await watcher?.close()
Expand Down Expand Up @@ -344,7 +343,7 @@ function loadConfigFromDir(dir: string) {
}

async function goToUrlAndWaitForViteWSConnect(page: Page, url: string) {
return Promise.all([page.goto(url), waitForViteConnect(page, 15000)])
return Promise.all([page.goto(url), waitForViteConnect(page, 50000)])
}

export async function waitForViteConnect(page: Page, timeoutMS = 5000) {
Expand All @@ -363,6 +362,7 @@ export async function waitForViteConnect(page: Page, timeoutMS = 5000) {
pageConsoleListener = (data) => {
const text = data.text()
if (text.includes('[vite] connected.')) {
console.log(browserLogs, 'browserLogs')
resolve()
}
}
Expand Down

0 comments on commit b609df2

Please sign in to comment.