MCPcopy
hub / github.com/vercel/next.js / checkIsReadyValues

Function checkIsReadyValues

test/integration/router-is-ready/test/index.test.ts:20–27  ·  view source on GitHub ↗
(browser, expected = [])

Source from the content-addressed store, hash-verified

18const invalidPage = new File(join(appDir, 'pages/invalid.js'))
19
20const checkIsReadyValues = (browser, expected = []) => {
21 return check(async () => {
22 const values = JSON.stringify(
23 (await browser.eval('window.isReadyValues')).sort()
24 )
25 return JSON.stringify(expected.sort()) === values ? 'success' : values
26 }, 'success')
27}
28
29function runTests() {
30 it('isReady should be true immediately for getInitialProps page', async () => {

Callers 1

runTestsFunction · 0.70

Calls 4

checkFunction · 0.90
evalMethod · 0.80
stringifyMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected