Unverified Commit 742f5d9a authored by James George's avatar James George Committed by GitHub

test(create-next-app): increase coverage (#17507)

Added a test case to make sure that creating a new project within the current directory works as expected.
parent 100a1d3a
...@@ -275,4 +275,16 @@ describe('create next app', () => { ...@@ -275,4 +275,16 @@ describe('create next app', () => {
} }
}, 0o500) }, 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()
)
})
})
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment