@@ -4,6 +4,7 @@ import { defineStarterTest } from './starter'
44import path from 'node:path'
55import os from 'node:os'
66import * as vite from 'vite'
7+ import { waitForHydration } from './helper'
78
89test . describe ( ( ) => {
910 // use RUNNER_TEMP on Github Actions
@@ -54,3 +55,34 @@ test.describe('vite 6', () => {
5455 defineStarterTest ( f )
5556 } )
5657} )
58+
59+ test . describe ( 'examples/ssg' , ( ) => {
60+ const tmpRoot = path . join (
61+ process . env [ 'RUNNER_TEMP' ] || os . tmpdir ( ) ,
62+ 'test-vite-rsc-ssg' ,
63+ )
64+ test . beforeAll ( async ( ) => {
65+ await setupIsolatedFixture ( {
66+ src : 'examples/ssg' ,
67+ dest : tmpRoot ,
68+ } )
69+ } )
70+
71+ test . describe ( 'dev' , ( ) => {
72+ const f = useFixture ( { root : tmpRoot , mode : 'dev' } )
73+
74+ test ( 'basic' , async ( { page } ) => {
75+ await page . goto ( f . url ( ) )
76+ await waitForHydration ( page )
77+ } )
78+ } )
79+
80+ test . describe ( 'build' , ( ) => {
81+ const f = useFixture ( { root : tmpRoot , mode : 'build' } )
82+
83+ test ( 'basic' , async ( { page } ) => {
84+ await page . goto ( f . url ( ) )
85+ await waitForHydration ( page )
86+ } )
87+ } )
88+ } )
0 commit comments