@@ -13,12 +13,12 @@ test.describe('Prerender Static Path Discovery', () => {
1313
1414 // These static routes should be automatically discovered and prerendered
1515 expect ( existsSync ( join ( distDir , 'index.html' ) ) ) . toBe ( true )
16- expect ( existsSync ( join ( distDir , 'posts.html' ) ) ) . toBe ( true )
17- expect ( existsSync ( join ( distDir , 'users.html' ) ) ) . toBe ( true )
18- expect ( existsSync ( join ( distDir , 'deferred.html' ) ) ) . toBe ( true )
19- expect ( existsSync ( join ( distDir , 'scripts.html' ) ) ) . toBe ( true )
20- expect ( existsSync ( join ( distDir , 'inline-scripts.html' ) ) ) . toBe ( true )
21- expect ( existsSync ( join ( distDir , '대한민국.html' ) ) ) . toBe ( true )
16+ expect ( existsSync ( join ( distDir , 'posts/index .html' ) ) ) . toBe ( true )
17+ expect ( existsSync ( join ( distDir , 'users/index .html' ) ) ) . toBe ( true )
18+ expect ( existsSync ( join ( distDir , 'deferred/index .html' ) ) ) . toBe ( true )
19+ expect ( existsSync ( join ( distDir , 'scripts/index .html' ) ) ) . toBe ( true )
20+ expect ( existsSync ( join ( distDir , 'inline-scripts/index .html' ) ) ) . toBe ( true )
21+ expect ( existsSync ( join ( distDir , '대한민국/index .html' ) ) ) . toBe ( true )
2222
2323 // Pathless layouts should NOT be prerendered (they start with _)
2424 expect ( existsSync ( join ( distDir , '_layout' , 'index.html' ) ) ) . toBe ( false ) // /_layout
@@ -34,19 +34,19 @@ test.describe('Prerender Static Path Discovery', () => {
3434 test . describe ( 'Static Files Verification' , ( ) => {
3535 test ( 'should contain prerendered content in posts.html' , ( ) => {
3636 const distDir = join ( process . cwd ( ) , 'dist' , 'client' )
37- expect ( existsSync ( join ( distDir , 'posts.html' ) ) ) . toBe ( true )
37+ expect ( existsSync ( join ( distDir , 'posts/index .html' ) ) ) . toBe ( true )
3838
3939 // "Select a post." should be in the prerendered HTML
40- const html = readFileSync ( join ( distDir , 'posts.html' ) , 'utf-8' )
40+ const html = readFileSync ( join ( distDir , 'posts/index .html' ) , 'utf-8' )
4141 expect ( html ) . toContain ( 'Select a post.' )
4242 } )
4343
4444 test ( 'should contain prerendered content in users.html' , ( ) => {
4545 const distDir = join ( process . cwd ( ) , 'dist' , 'client' )
46- expect ( existsSync ( join ( distDir , 'users.html' ) ) ) . toBe ( true )
46+ expect ( existsSync ( join ( distDir , 'users/index .html' ) ) ) . toBe ( true )
4747
4848 // "Select a user." should be in the prerendered HTML
49- const html = readFileSync ( join ( distDir , 'users.html' ) , 'utf-8' )
49+ const html = readFileSync ( join ( distDir , 'users/index .html' ) , 'utf-8' )
5050 expect ( html ) . toContain ( 'Select a user.' )
5151 } )
5252 } )
0 commit comments