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

Function runTests

test/integration/next-dynamic-css/test/index.test.ts:17–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15const appDir = join(__dirname, '../')
16
17function runTests() {
18 it('should load a Pages Router page correctly', async () => {
19 const browser = await webdriver(appPort, '/')
20
21 expect(
22 await browser
23 .elementByCss('#__next div:nth-child(2)')
24 .getComputedCss('background-color')
25 ).toContain('221, 221, 221')
26
27 expect(await browser.eval('document.documentElement.innerHTML')).toContain(
28 'Where does it come from?'
29 )
30 })
31
32 it('should load a App Router page correctly', async () => {
33 const browser = await webdriver(appPort, '/test-app')
34
35 expect(
36 await browser
37 .elementByCss('body div:nth-child(3)')
38 .getComputedCss('background-color')
39 ).toContain('221, 221, 221')
40
41 expect(await browser.eval('document.documentElement.innerHTML')).toContain(
42 'Where does it come from?'
43 )
44 })
45}
46
47describe('next/dynamic', () => {
48 ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)(

Callers 1

index.test.tsFile · 0.70

Calls 6

webdriverFunction · 0.85
elementByCssMethod · 0.80
evalMethod · 0.80
getComputedCssMethod · 0.65
itFunction · 0.50
expectFunction · 0.50

Tested by

no test coverage detected