Unverified Commit 982e880f authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update CNA tests on windows for further investigating (#11779)

parent 0c2a6d8f
...@@ -29,7 +29,7 @@ const runStarter = (...args) => { ...@@ -29,7 +29,7 @@ const runStarter = (...args) => {
describe('create next app', () => { describe('create next app', () => {
beforeAll(async () => { beforeAll(async () => {
jest.setTimeout(1000 * 60 * 3) jest.setTimeout(1000 * 60 * 2)
await fs.mkdirp(cwd) await fs.mkdirp(cwd)
}) })
...@@ -47,6 +47,9 @@ describe('create next app', () => { ...@@ -47,6 +47,9 @@ describe('create next app', () => {
} }
}) })
// TODO: investigate why this test stalls on yarn install when
// stdin is piped instead of inherited on windows
if (process.platform !== 'win32') {
it('empty directory', async () => { it('empty directory', async () => {
const projectName = 'empty-directory' const projectName = 'empty-directory'
const res = await runStarter(projectName) const res = await runStarter(projectName)
...@@ -59,6 +62,7 @@ describe('create next app', () => { ...@@ -59,6 +62,7 @@ describe('create next app', () => {
fs.existsSync(path.join(cwd, projectName, 'pages/index.js')) fs.existsSync(path.join(cwd, projectName, 'pages/index.js'))
).toBeTruthy() ).toBeTruthy()
}) })
}
it('invalid example name', async () => { it('invalid example name', async () => {
const projectName = 'invalid-example-name' const projectName = 'invalid-example-name'
...@@ -163,6 +167,9 @@ describe('create next app', () => { ...@@ -163,6 +167,9 @@ describe('create next app', () => {
).toBeTruthy() ).toBeTruthy()
}) })
// TODO: investigate why this test stalls on yarn install when
// stdin is piped instead of inherited on windows
if (process.platform !== 'win32') {
it('should allow to manually select an example', async () => { it('should allow to manually select an example', async () => {
const runExample = (...args) => { const runExample = (...args) => {
const res = run(...args) const res = run(...args)
...@@ -200,4 +207,5 @@ describe('create next app', () => { ...@@ -200,4 +207,5 @@ describe('create next app', () => {
expect(res.exitCode).toBe(0) expect(res.exitCode).toBe(0)
expect(res.stdout).toMatch(/Downloading files for example hello-world/) expect(res.stdout).toMatch(/Downloading files for example hello-world/)
}) })
}
}) })
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