Skip to content

Commit 253e065

Browse files
committed
test: verify development
1 parent f764d7c commit 253e065

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

packages/plugin-rsc/e2e/starter.test.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test.describe('dev-production', () => {
5757
await page.goto(f.url())
5858
await waitForHydration_(page)
5959
const res = await page.request.get(f.url('src/client.tsx'))
60-
expect(await res.text()).not.toContain('jsxDev')
60+
expect(await res.text()).not.toContain('jsxDEV')
6161
})
6262
})
6363

@@ -71,8 +71,17 @@ test.describe('build-development', () => {
7171
})
7272
defineTest(f)
7373

74-
test('verify development', async () => {
75-
// TODO
74+
test('verify development', async ({ page }) => {
75+
let output!: string
76+
page.on('response', async (response) => {
77+
if (response.url().match(/\/assets\/client-[\w-]+\.js$/)) {
78+
output = await response.text()
79+
}
80+
})
81+
await page.goto(f.url())
82+
await waitForHydration_(page)
83+
console.log({ output })
84+
expect(output).toContain('jsxDEV')
7685
})
7786
})
7887

0 commit comments

Comments
 (0)