Skip to content

Commit 806abda

Browse files
committed
test: test no ssr build
1 parent d878e2a commit 806abda

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { expect, test } from '@playwright/test'
22
import { type Fixture, useFixture } from './fixture'
33
import { expectNoReload, testNoJs, waitForHydration } from './helper'
4+
import path from 'node:path'
5+
import fs from 'node:fs'
46

57
test.describe('dev-default', () => {
68
const f = useFixture({ root: 'examples/starter', mode: 'dev' })
@@ -30,6 +32,10 @@ test.describe('dev-no-ssr', () => {
3032
test.describe('build-no-ssr', () => {
3133
const f = useFixture({ root: 'examples/no-ssr', mode: 'build' })
3234
defineTest(f, 'no-ssr')
35+
36+
test('no ssr build', () => {
37+
expect(fs.existsSync(path.join(f.root, 'dist/ssr'))).toBe(false)
38+
})
3339
})
3440

3541
function defineTest(f: Fixture, variant?: 'no-ssr') {

0 commit comments

Comments
 (0)