From d8253f1ae724b5e078e02c3c74b225bdd7d7f8d0 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sun, 8 Dec 2024 17:17:40 +0900 Subject: [PATCH] test: test server stacktrace --- playground/rolldown-dev-ssr/__tests__/basic.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playground/rolldown-dev-ssr/__tests__/basic.spec.ts b/playground/rolldown-dev-ssr/__tests__/basic.spec.ts index 63a4ec15023f89..c1516731894bff 100644 --- a/playground/rolldown-dev-ssr/__tests__/basic.spec.ts +++ b/playground/rolldown-dev-ssr/__tests__/basic.spec.ts @@ -11,6 +11,12 @@ test('basic', async () => { expect(await res.text()).toContain('hydrated: false') }) +test.runIf(!isBuild)('server stacktrace', async () => { + const res = await page.goto(viteTestUrl + '/crash-ssr') + expect(await res?.text()).toContain('src/error.ts:8:9') + expect(res?.status()).toBe(500) +}) + test.runIf(!isBuild)('hmr', async () => { await page.goto(viteTestUrl) await page.getByRole('button', { name: 'Count: 0' }).click()