Skip to content

Commit 0c8c0e5

Browse files
committed
test: add comments based on the previous test
1 parent b9dd477 commit 0c8c0e5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/unit/eslint-plugin-next/no-async-client-component.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,29 @@ const message =
1010
const tests = {
1111
valid: [
1212
`
13+
// single line
1314
export default async function MyComponent() {
1415
return <></>
1516
}
1617
`,
1718
`
19+
// single line capitalization
1820
"use client"
1921
2022
export default async function myFunction() {
2123
return ''
2224
}
2325
`,
2426
`
27+
// multiple line
2528
async function MyComponent() {
2629
return <></>
2730
}
2831
2932
export default MyComponent
3033
`,
3134
`
35+
// multiple line capitalization
3236
"use client"
3337
3438
async function myFunction() {
@@ -38,6 +42,7 @@ const tests = {
3842
export default myFunction
3943
`,
4044
`
45+
// arrow function
4146
"use client"
4247
4348
const myFunction = () => {
@@ -50,6 +55,7 @@ const tests = {
5055
invalid: [
5156
{
5257
code: `
58+
// single line
5359
"use client"
5460
5561
export default async function MyComponent() {
@@ -60,6 +66,7 @@ const tests = {
6066
},
6167
{
6268
code: `
69+
// single line capitalization
6370
"use client"
6471
6572
export default async function MyFunction() {
@@ -70,6 +77,7 @@ const tests = {
7077
},
7178
{
7279
code: `
80+
// multiple line
7381
"use client"
7482
7583
async function MyComponent() {
@@ -82,6 +90,7 @@ const tests = {
8290
},
8391
{
8492
code: `
93+
// multiple line capitalization
8594
"use client"
8695
8796
async function MyFunction() {
@@ -94,6 +103,7 @@ const tests = {
94103
},
95104
{
96105
code: `
106+
// arrow function
97107
"use client"
98108
99109
const MyFunction = async () => {
@@ -107,7 +117,7 @@ const tests = {
107117
],
108118
}
109119

110-
describe('no-async-client-component single line', () => {
120+
describe('no-async-client-component', () => {
111121
new ESLintTesterV8({
112122
parserOptions: {
113123
ecmaVersion: 2018,

0 commit comments

Comments
 (0)