Unverified Commit 5f937d6e authored by JJ Kasper's avatar JJ Kasper Committed by GitHub
parent d1f18a51
......@@ -178,13 +178,17 @@ describe('ReactRefreshRegression app', () => {
`
)
expect(
await session.evaluate(() => document.querySelector('p').textContent)
).toBe('0')
await check(
() => session.evaluate(() => document.querySelector('p').textContent),
'0'
)
await session.evaluate(() => document.querySelector('button').click())
expect(
await session.evaluate(() => document.querySelector('p').textContent)
).toBe('1')
await check(
() => session.evaluate(() => document.querySelector('p').textContent),
'1'
)
await session.patch(
'index.js',
......@@ -204,13 +208,17 @@ describe('ReactRefreshRegression app', () => {
`
)
expect(
await session.evaluate(() => document.querySelector('p').textContent)
).toBe('Count: 1')
await check(
() => session.evaluate(() => document.querySelector('p').textContent),
'Count: 1'
)
await session.evaluate(() => document.querySelector('button').click())
expect(
await session.evaluate(() => document.querySelector('p').textContent)
).toBe('Count: 2')
await check(
() => session.evaluate(() => document.querySelector('p').textContent),
'Count: 2'
)
await cleanup()
})
......
......@@ -5,7 +5,8 @@ describe('Disable fallback polyfills', () => {
let next: NextInstance
function getFirstLoadSize(output: string) {
const firstLoadRe = /○ \/\s*(\d*) k?B\s*(?<firstLoad>.*) kB/
const firstLoadRe =
/○ \/.*? (?<size>\d.*?) [^\d]{2} (?<firstLoad>\d.*?) [^\d]{2}/
return Number(output.match(firstLoadRe).groups.firstLoad)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment