Unverified Commit 5f937d6e authored by JJ Kasper's avatar JJ Kasper Committed by GitHub
parent d1f18a51
...@@ -178,13 +178,17 @@ describe('ReactRefreshRegression app', () => { ...@@ -178,13 +178,17 @@ describe('ReactRefreshRegression app', () => {
` `
) )
expect( await check(
await session.evaluate(() => document.querySelector('p').textContent) () => session.evaluate(() => document.querySelector('p').textContent),
).toBe('0') '0'
)
await session.evaluate(() => document.querySelector('button').click()) await session.evaluate(() => document.querySelector('button').click())
expect(
await session.evaluate(() => document.querySelector('p').textContent) await check(
).toBe('1') () => session.evaluate(() => document.querySelector('p').textContent),
'1'
)
await session.patch( await session.patch(
'index.js', 'index.js',
...@@ -204,13 +208,17 @@ describe('ReactRefreshRegression app', () => { ...@@ -204,13 +208,17 @@ describe('ReactRefreshRegression app', () => {
` `
) )
expect( await check(
await session.evaluate(() => document.querySelector('p').textContent) () => session.evaluate(() => document.querySelector('p').textContent),
).toBe('Count: 1') 'Count: 1'
)
await session.evaluate(() => document.querySelector('button').click()) await session.evaluate(() => document.querySelector('button').click())
expect(
await session.evaluate(() => document.querySelector('p').textContent) await check(
).toBe('Count: 2') () => session.evaluate(() => document.querySelector('p').textContent),
'Count: 2'
)
await cleanup() await cleanup()
}) })
......
...@@ -5,7 +5,8 @@ describe('Disable fallback polyfills', () => { ...@@ -5,7 +5,8 @@ describe('Disable fallback polyfills', () => {
let next: NextInstance let next: NextInstance
function getFirstLoadSize(output: string) { 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) 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