Skip to content

Commit 5a49b88

Browse files
timneutkenshuozhi
andauthored
Use consistent name for App Router tests (#56352)
Ensures all App Router tests have a unique name and similar reference (with `-`). <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> --------- Co-authored-by: Jiachi Liu <[email protected]>
1 parent 2a47931 commit 5a49b88

File tree

14 files changed

+16
-16
lines changed

14 files changed

+16
-16
lines changed

test/e2e/app-dir/app-css-pageextensions/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createNextDescribe } from 'e2e-utils'
22

33
createNextDescribe(
4-
'app dir css with pageextensions',
4+
'app dir - css with pageextensions',
55
{
66
files: __dirname,
77
skipDeployment: true,

test/e2e/app-dir/app-css/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createNextDescribe } from 'e2e-utils'
22
import { check } from 'next-test-utils'
33

44
createNextDescribe(
5-
'app dir css',
5+
'app dir - css',
66
{
77
files: __dirname,
88
skipDeployment: true,

test/e2e/app-dir/app-middleware/app-middleware.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ createNextDescribe(
138138
)
139139

140140
createNextDescribe(
141-
'app dir middleware without pages dir',
141+
'app dir - middleware without pages dir',
142142
{
143143
files: {
144144
app: new FileRef(path.join(__dirname, 'app')),
@@ -168,7 +168,7 @@ createNextDescribe(
168168
)
169169

170170
createNextDescribe(
171-
'app dir middleware with middleware in src dir',
171+
'app dir - middleware with middleware in src dir',
172172
{
173173
files: {
174174
'src/app': new FileRef(path.join(__dirname, 'app')),

test/e2e/app-dir/app-prefetch/prefetching.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const browserConfigWithFixedTime = {
2828
}
2929

3030
createNextDescribe(
31-
'app dir prefetching',
31+
'app dir - prefetching',
3232
{
3333
files: __dirname,
3434
skipDeployment: true,

test/e2e/app-dir/app-validation/validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createNextDescribe } from 'e2e-utils'
22

33
createNextDescribe(
4-
'app dir validation',
4+
'app dir - validation',
55
{
66
files: __dirname,
77
skipDeployment: true,

test/e2e/app-dir/app/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BrowserInterface } from 'test/lib/browsers/base'
66
import { Request } from 'playwright-core'
77

88
createNextDescribe(
9-
'app dir',
9+
'app dir - basic',
1010
{
1111
files: __dirname,
1212
buildCommand: process.env.NEXT_EXPERIMENTAL_COMPILE

test/e2e/app-dir/import/import.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createNextDescribe } from 'e2e-utils'
22

33
createNextDescribe(
4-
'app dir imports',
4+
'app dir - imports',
55
{
66
files: __dirname,
77
},

test/e2e/app-dir/next-font/next-font.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const getAttrs = (elems: Cheerio) =>
2525

2626
describe.each([['app'], ['app-old']])('%s', (fixture: string) => {
2727
createNextDescribe(
28-
'app dir next-font',
28+
'app dir - next-font',
2929
{
3030
files: {
3131
app: new FileRef(join(__dirname, fixture)),

test/e2e/app-dir/next-image/next-image-https.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createNextDescribe } from '../../../lib/e2e-utils'
22

33
createNextDescribe(
4-
'app dir next-image (with https)',
4+
'app dir - next-image (with https)',
55
{
66
files: __dirname,
77
skipDeployment: true,

test/e2e/app-dir/next-image/next-image.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createNextDescribe } from 'e2e-utils'
22

33
createNextDescribe(
4-
'app dir next-image',
4+
'app dir - next-image',
55
{
66
files: __dirname,
77
skipDeployment: true,

test/e2e/skip-trailing-slash-redirect/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ describe('skip-trailing-slash-redirect', () => {
367367
runSharedTests('/')
368368
})
369369

370-
describe('app dir', () => {
370+
describe('app dir - skip trailing slash redirect', () => {
371371
runSharedTests('/with-app-dir/')
372372
})
373373
})

test/integration/app-dir-export/test/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
nextConfig,
1111
} from './utils'
1212

13-
describe('app dir with output export (next dev / next build)', () => {
13+
describe('app dir - with output export (next dev / next build)', () => {
1414
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
1515
it('should throw when exportPathMap configured', async () => {
1616
nextConfig.replace(

test/integration/app-dir-export/test/start.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const exportDir = join(appDir, 'out')
1717
const nextConfig = new File(join(appDir, 'next.config.js'))
1818
let app
1919

20-
describe('app dir with output export (next start)', () => {
20+
describe('app dir - with output export (next start)', () => {
2121
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
2222
afterEach(async () => {
2323
await killApp(app)

test/production/build-spinners/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ describe('build-spinners', () => {
6666
})
6767

6868
it.each([
69-
{ name: 'app dir', files: appDirFiles },
69+
{ name: 'app dir - basic', files: appDirFiles },
7070
{
71-
name: 'app dir (compile workers)',
71+
name: 'app dir - (compile workers)',
7272
files: [
7373
...appDirFiles,
7474
{

0 commit comments

Comments
 (0)