Attempt: fix the CI errors

This commit is contained in:
Aria Minaei 2023-07-30 17:50:21 +02:00 committed by Aria
parent dc2338bb83
commit 2670c670f6
3 changed files with 13 additions and 3 deletions

View file

@ -114,4 +114,4 @@ jobs:
# This will test whether `npm install`/`yarn install` can actually run on each compatibility test fixture. See `compat-tests/README.md` for more info. # This will test whether `npm install`/`yarn install` can actually run on each compatibility test fixture. See `compat-tests/README.md` for more info.
- run: yarn workspace @theatre/compat-tests run install-fixtures --verbose - run: yarn workspace @theatre/compat-tests run install-fixtures --verbose
# after that, we run the jest tests for each fixture # after that, we run the jest tests for each fixture
- run: yarn test:compat:run - run: yarn test:compat:run --verbose

View file

@ -0,0 +1,5 @@
{
"compilerOptions": {
"jsx": "react"
}
}

View file

@ -103,13 +103,18 @@ async function testTheatreOnPage(page: Page, {url}: {url: string}) {
try { try {
await page.goto(url, { await page.goto(url, {
waitUntil: 'domcontentloaded', waitUntil: 'domcontentloaded',
timeout: 30000, timeout: 1000 * 60 * 2,
}) })
// give the console listener 3 seconds to resolve, otherwise fail the test // give the console listener 3 seconds to resolve, otherwise fail the test
await Promise.race([ await Promise.race([
d.promise, d.promise,
new Promise((_, reject) => setTimeout(() => reject('Timed out'), 30000)), new Promise((_, reject) =>
setTimeout(
() => reject('Did not intercept any test-related console logs'),
30000,
),
),
]) ])
} finally { } finally {
page.off('console', processConsoleEvents) page.off('console', processConsoleEvents)