@@ -4,6 +4,7 @@ import { defineStarterTest } from './starter'
4
4
import path from 'node:path'
5
5
import os from 'node:os'
6
6
import * as vite from 'vite'
7
+ import { waitForHydration } from './helper'
7
8
8
9
test . describe ( ( ) => {
9
10
// use RUNNER_TEMP on Github Actions
@@ -54,3 +55,34 @@ test.describe('vite 6', () => {
54
55
defineStarterTest ( f )
55
56
} )
56
57
} )
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