Skip to content

Commit

Permalink
Temporarily disable app dir export integration test (#48291)
Browse files Browse the repository at this point in the history
As the integration tests are keeping failed on canary, turns out that
the require hook didn't set up properly so when running the
app-dir-export integration test it breaks others. Will re-enable it once
migrated to e2e tests

x-ref:
https://github.com/vercel/next.js/actions/runs/4668919790/jobs/8266728783?pr=48252#step:6:149
x-ref:
https://github.com/vercel/next.js/actions/runs/4668707070/jobs/8266215431?pr=48252#step:6:325
x-ref:
https://github.com/vercel/next.js/actions/runs/4675947717/jobs/8281764592?pr=48276
  • Loading branch information
huozhi committed Apr 12, 2023
1 parent 8273ba5 commit 805183e
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 74 deletions.
2 changes: 1 addition & 1 deletion test/integration/app-dir-export/test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
nextConfig,
} from './utils'

describe('app dir with output export (next dev / next build)', () => {
describe.skip('app dir with output export (next dev / next build)', () => {
it('should throw when exportPathMap configured', async () => {
nextConfig.replace(
'trailingSlash: true,',
Expand Down
32 changes: 17 additions & 15 deletions test/integration/app-dir-export/test/dynamicapiroute-dev.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { runTests } from './utils'

it.each([
{ dynamicApiRoute: 'undefined' },
{ dynamicApiRoute: "'error'" },
{ dynamicApiRoute: "'force-static'" },
{
dynamicApiRoute: "'force-dynamic'",
expectedErrMsg:
'export const dynamic = "force-dynamic" on page "/api/json" cannot be used with "output: export".',
},
])(
'should work in dev with dynamicApiRoute $dynamicApiRoute',
async ({ dynamicApiRoute, expectedErrMsg }) => {
await runTests({ isDev: true, dynamicApiRoute, expectedErrMsg })
}
)
describe.skip('dynamic api route dev', () => {
it.each([
{ dynamicApiRoute: 'undefined' },
{ dynamicApiRoute: "'error'" },
{ dynamicApiRoute: "'force-static'" },
{
dynamicApiRoute: "'force-dynamic'",
expectedErrMsg:
'export const dynamic = "force-dynamic" on page "/api/json" cannot be used with "output: export".',
},
])(
'should work in dev with dynamicApiRoute $dynamicApiRoute',
async ({ dynamicApiRoute, expectedErrMsg }) => {
await runTests({ isDev: true, dynamicApiRoute, expectedErrMsg })
}
)
})
32 changes: 17 additions & 15 deletions test/integration/app-dir-export/test/dynamicapiroute-prod.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { runTests } from './utils'

it.each([
{ dynamicApiRoute: 'undefined' },
{ dynamicApiRoute: "'error'" },
{ dynamicApiRoute: "'force-static'" },
{
dynamicApiRoute: "'force-dynamic'",
expectedErrMsg:
'export const dynamic = "force-dynamic" on page "/api/json" cannot be used with "output: export".',
},
])(
'should work in prod with dynamicApiRoute $dynamicApiRoute',
async ({ dynamicApiRoute, expectedErrMsg }) => {
await runTests({ isDev: false, dynamicApiRoute, expectedErrMsg })
}
)
describe.skip('dynamic api route prod', () => {
it.each([
{ dynamicApiRoute: 'undefined' },
{ dynamicApiRoute: "'error'" },
{ dynamicApiRoute: "'force-static'" },
{
dynamicApiRoute: "'force-dynamic'",
expectedErrMsg:
'export const dynamic = "force-dynamic" on page "/api/json" cannot be used with "output: export".',
},
])(
'should work in prod with dynamicApiRoute $dynamicApiRoute',
async ({ dynamicApiRoute, expectedErrMsg }) => {
await runTests({ isDev: false, dynamicApiRoute, expectedErrMsg })
}
)
})
32 changes: 17 additions & 15 deletions test/integration/app-dir-export/test/dynamicpage-dev.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { runTests } from './utils'

it.each([
{ dynamicPage: 'undefined' },
{ dynamicPage: "'error'" },
{ dynamicPage: "'force-static'" },
{
dynamicPage: "'force-dynamic'",
expectedErrMsg:
'Page with `dynamic = "force-dynamic"` couldn\'t be rendered statically because it used `output: export`.',
},
])(
'should work in dev with dynamicPage $dynamicPage',
async ({ dynamicPage, expectedErrMsg }) => {
await runTests({ isDev: true, dynamicPage, expectedErrMsg })
}
)
describe.skip('dynamic page dev', () => {
it.each([
{ dynamicPage: 'undefined' },
{ dynamicPage: "'error'" },
{ dynamicPage: "'force-static'" },
{
dynamicPage: "'force-dynamic'",
expectedErrMsg:
'Page with `dynamic = "force-dynamic"` couldn\'t be rendered statically because it used `output: export`.',
},
])(
'should work in dev with dynamicPage $dynamicPage',
async ({ dynamicPage, expectedErrMsg }) => {
await runTests({ isDev: true, dynamicPage, expectedErrMsg })
}
)
})
32 changes: 17 additions & 15 deletions test/integration/app-dir-export/test/dynamicpage-prod.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { runTests } from './utils'

it.each([
{ dynamicPage: 'undefined' },
{ dynadynamicPagemic: "'error'" },
{ dynamicPage: "'force-static'" },
{
dynamicPage: "'force-dynamic'",
expectedErrMsg:
'Page with `dynamic = "force-dynamic"` couldn\'t be rendered statically because it used `output: export`.',
},
])(
'should work in prod with dynamicPage $dynamicPage',
async ({ dynamicPage, expectedErrMsg }) => {
await runTests({ isDev: false, dynamicPage, expectedErrMsg })
}
)
describe.skip('dynamic page dev', () => {
it.each([
{ dynamicPage: 'undefined' },
{ dynadynamicPagemic: "'error'" },
{ dynamicPage: "'force-static'" },
{
dynamicPage: "'force-dynamic'",
expectedErrMsg:
'Page with `dynamic = "force-dynamic"` couldn\'t be rendered statically because it used `output: export`.',
},
])(
'should work in prod with dynamicPage $dynamicPage',
async ({ dynamicPage, expectedErrMsg }) => {
await runTests({ isDev: false, dynamicPage, expectedErrMsg })
}
)
})
2 changes: 1 addition & 1 deletion test/integration/app-dir-export/test/start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const exportDir = join(appDir, 'out')
const nextConfig = new File(join(appDir, 'next.config.js'))
let app

describe('app dir with output export (next start)', () => {
describe.skip('app dir with output export (next start)', () => {
afterEach(async () => {
await killApp(app)
nextConfig.restore()
Expand Down
14 changes: 8 additions & 6 deletions test/integration/app-dir-export/test/trailing-slash-dev.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { runTests } from './utils'

it.each([{ trailingSlash: false }, { trailingSlash: true }])(
"should work in dev with trailingSlash '$trailingSlash'",
async ({ trailingSlash }) => {
await runTests({ isDev: true, trailingSlash })
}
)
describe.skip('trailing slash dev', () => {
it.each([{ trailingSlash: false }, { trailingSlash: true }])(
"should work in dev with trailingSlash '$trailingSlash'",
async ({ trailingSlash }) => {
await runTests({ isDev: true, trailingSlash })
}
)
})
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { runTests } from './utils'

it.each([{ trailingSlash: false }, { trailingSlash: true }])(
"should work in prod with trailingSlash '$trailingSlash'",
async ({ trailingSlash }) => {
await runTests({ isDev: false, trailingSlash })
}
)
describe.skip('trailing slash dev', () => {
it.each([{ trailingSlash: false }, { trailingSlash: true }])(
"should work in prod with trailingSlash '$trailingSlash'",
async ({ trailingSlash }) => {
await runTests({ isDev: false, trailingSlash })
}
)
})

0 comments on commit 805183e

Please sign in to comment.