Skip to content

Commit 49f0542

Browse files
committed
chore: update chunk test
1 parent 4f516ae commit 49f0542

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tests/dynamicImports.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ describe('next-on-netlify', () => {
3939
})
4040

4141
test('copies chunk files to functions dir', () => {
42-
// This only tests WP5 as Next is -D installed @ 10.2.0
43-
const chunkFiles = readdirSync(join(functionsDir, 'next_index', 'nextPage', 'chunks'))
44-
expect(chunkFiles.length).toEqual(1) // just the header
42+
const headerChunkExists = existsSync(join(functionsDir, 'next_index', 'nextPage', 'chunks', 'headers.js'))
43+
expect(headerChunkExists).toBeTruthy()
4544
})
4645
})

0 commit comments

Comments
 (0)