Skip to content

Commit

Permalink
Increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Oct 8, 2022
1 parent 30193f2 commit 7b9cfc2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
whyframe
</h1>

<p align="center">
<a href="https://github.com/bluwy/whyframe/actions/workflows/ci.yml">
<img src="https://github.com/bluwy/whyframe/actions/workflows/ci.yml/badge.svg" alt="ci" />
</a>
<a href="https://whyframe.dev/chat">
<img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat">
</a>
</p>

`whyframe` enables rendering any UI framework markup within an `iframe`, including Svelte, Vue, Solid, Preact, and React. Simply:

<!-- prettier-ignore -->
Expand Down
6 changes: 5 additions & 1 deletion tests/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { execa, execaCommand } from 'execa'
import treeKill from 'tree-kill'

const killPid = promisify(treeKill)
const beforeAllTimeout = process.env.CI ? 60000 : 30000
const waitUrlTimeout = process.env.CI ? 30000 : 15000

export const isDev = !process.env.TEST_BUILD
export const isBuild = !!process.env.TEST_BUILD
Expand All @@ -21,6 +23,7 @@ function setupDevServer() {
let cp

test.beforeAll(async ({ request }, info) => {
test.setTimeout(beforeAllTimeout)
const cwd = info.project.testDir
const url = info.project.use.baseURL
const port = url.split(':').pop()
Expand All @@ -41,6 +44,7 @@ function setupPreviewServer() {
let cp

test.beforeAll(async ({ request }, info) => {
test.setTimeout(beforeAllTimeout)
const cwd = info.project.testDir
const url = info.project.use.baseURL
const port = url.split(':').pop()
Expand All @@ -64,7 +68,7 @@ function setupPreviewServer() {
async function waitUrlReady(url, request) {
let timeout
const timeoutPromise = new Promise((_, reject) => {
timeout = setTimeout(() => reject(`Timeout for ${url}`), 20000)
timeout = setTimeout(() => reject(`Timeout for ${url}`), waitUrlTimeout)
})

let interval
Expand Down

0 comments on commit 7b9cfc2

Please sign in to comment.