Ensure dist-dir test has fresh start (#19370)

h/t to @prateekbh for noticing this test isn't cleaning up properly 

Closes: https://github.com/vercel/next.js/issues/19369
This commit is contained in:
JJ Kasper 2020-11-21 11:19:19 -06:00 committed by GitHub
parent b28b8b2913
commit 53a4458bae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,8 @@ let app
describe('distDir', () => {
describe('With basic usage', () => {
beforeAll(async () => {
await fs.remove(join(appDir, '.next'))
await fs.remove(join(appDir, 'dist'))
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)