Skip to content

Commit

Permalink
test: run all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Mar 3, 2022
1 parent 342bb61 commit 4a53801
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/integration/create-next-app/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const cli = require.resolve('create-next-app/dist/index.js')
const exampleRepo = 'https://github.com/vercel/next.js/tree/canary'
const examplePath = 'examples/basic-css'

const run = (args, options: execa.Options) =>
const run = (args: string[], options: execa.Options) =>
execa('node', [cli].concat(args), options)

async function usingTempDir(fn: (...args: any[]) => any, options?: any) {
Expand Down Expand Up @@ -99,13 +99,10 @@ describe('create next app', () => {
})
})

it.only('should support typescript flag', async () => {
it('should support typescript flag', async () => {
await usingTempDir(async (cwd) => {
const projectName = 'typescript'
const res = await run([projectName, '--typescript'], {
cwd,
stdio: 'inherit',
})
const res = await run([projectName, '--typescript'], { cwd })
expect(res.exitCode).toBe(0)

const files = [
Expand All @@ -121,9 +118,6 @@ describe('create next app', () => {
'.gitignore',
]

const root = fs.readdirSync(path.join(cwd, projectName))
console.log({ root })

files.forEach((file) =>
expect(fs.existsSync(path.join(cwd, projectName, file))).toBeTruthy()
)
Expand Down

0 comments on commit 4a53801

Please sign in to comment.