diff --git a/test/basic.generate.nosubfolders.test.js b/test/basic.generate.nosubfolders.test.js index 5fde5d65b9..ce9c1d813a 100644 --- a/test/basic.generate.nosubfolders.test.js +++ b/test/basic.generate.nosubfolders.test.js @@ -1,5 +1,6 @@ import test from 'ava' import { resolve } from 'path' +import { existsSync } from 'fs' import http from 'http' import serveStatic from 'serve-static' import finalhandler from 'finalhandler' @@ -78,6 +79,8 @@ test('/async-data', async t => { test('/users/1', async t => { const html = await rp(url('/users/1')) t.true(html.includes('

User: 1

')) + t.true(existsSync(resolve(__dirname, 'fixtures/basic/dist', 'users/1.html'))) + t.false(existsSync(resolve(__dirname, 'fixtures/basic/dist', 'users/1/index.html'))) }) test('/users/2', async t => { diff --git a/test/basic.generate.test.js b/test/basic.generate.test.js index dc0eb55caf..0e1020847e 100644 --- a/test/basic.generate.test.js +++ b/test/basic.generate.test.js @@ -1,5 +1,6 @@ import test from 'ava' import { resolve } from 'path' +import { existsSync } from 'fs' import http from 'http' import serveStatic from 'serve-static' import finalhandler from 'finalhandler' @@ -75,6 +76,8 @@ test('/async-data', async t => { test('/users/1', async t => { const html = await rp(url('/users/1')) t.true(html.includes('

User: 1

')) + t.true(existsSync(resolve(__dirname, 'fixtures/basic/dist', 'users/1/index.html'))) + t.false(existsSync(resolve(__dirname, 'fixtures/basic/dist', 'users/1.html'))) }) test('/users/2', async t => {