1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fix ondemand test cases.

This commit is contained in:
Arunoda Susiripala 2017-04-05 08:21:20 +05:30
parent a1f11a4660
commit 6f65a053a8

View file

@ -31,13 +31,13 @@ describe('On Demand Entries', () => {
}) })
it('should compile pages for JSON page requests', async () => { it('should compile pages for JSON page requests', async () => {
const pageContent = await renderViaHTTP(context.appPort, '/_next/-/pages/about') const pageContent = await renderViaHTTP(context.appPort, '/_next/-/page/about')
expect(pageContent.includes('About Page')).toBeTruthy() expect(pageContent.includes('About Page')).toBeTruthy()
}) })
it('should dispose inactive pages', async () => { it('should dispose inactive pages', async () => {
await renderViaHTTP(context.appPort, '/_next/-/pages/about') await renderViaHTTP(context.appPort, '/_next/-/pages/about')
const aboutPagePath = resolve(__dirname, '../.next/bundles/pages/about.json') const aboutPagePath = resolve(__dirname, '../.next/client-bundles/pages/about.js')
expect(existsSync(aboutPagePath)).toBeTruthy() expect(existsSync(aboutPagePath)).toBeTruthy()
// Wait maximum of jasmine.DEFAULT_TIMEOUT_INTERVAL checking // Wait maximum of jasmine.DEFAULT_TIMEOUT_INTERVAL checking