Skip to content

Commit

Permalink
test(create-next-app): increase coverage (#17507)
Browse files Browse the repository at this point in the history
Added a test case to make sure that creating a new project within the current directory works as expected.
  • Loading branch information
jamesgeorge007 committed Oct 5, 2020
1 parent 100a1d3 commit 742f5d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/create-next-app/index.test.js
Expand Up @@ -275,4 +275,16 @@ describe('create next app', () => {
}
}, 0o500)
})

it('should create a project in the current directory', async () => {
await usingTempDir(async (cwd) => {
const res = await run(cwd, '.')
expect(res.exitCode).toBe(0)

const files = ['package.json', 'pages/index.js', '.gitignore']
files.forEach((file) =>
expect(fs.existsSync(path.join(cwd, file))).toBeTruthy()
)
})
})
})

0 comments on commit 742f5d9

Please sign in to comment.