@@ -12,11 +12,6 @@ const ruleTester = new TSESLint.RuleTester({
12
12
13
13
ruleTester . run ( 'valid-describe' , rule , {
14
14
valid : [
15
- 'describe["each"]()()' ,
16
- 'describe["each"](() => {})()' ,
17
- 'describe["each"](() => {})("foo")' ,
18
- 'describe["each"]()(() => {})' ,
19
- 'describe["each"]("foo")(() => {})' ,
20
15
'describe.each([1, 2, 3])("%s", (a, b) => {});' ,
21
16
'describe("foo", function() {})' ,
22
17
'describe("foo", () => {})' ,
@@ -51,18 +46,21 @@ ruleTester.run('valid-describe', rule, {
51
46
}
52
47
` ,
53
48
dedent `
54
- describe.each\`
55
- something | other
56
- ${ 1 } | ${ 2 } |
57
- \`
58
- ("$something", ({ something, other }) => { });
49
+ describe.each\`
50
+ foo | foe
51
+ ${ 1 } | ${ 2 }
52
+ \`('$something', ({ foo, foe }) => {});
59
53
` ,
60
54
] ,
61
55
invalid : [
62
56
{
63
57
code : 'describe.each()()' ,
64
58
errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 1 } ] ,
65
59
} ,
60
+ {
61
+ code : 'describe["each"]()()' ,
62
+ errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 1 } ] ,
63
+ } ,
66
64
{
67
65
code : 'describe.each(() => {})()' ,
68
66
errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 1 } ] ,
@@ -75,10 +73,18 @@ ruleTester.run('valid-describe', rule, {
75
73
code : 'describe.each()(() => {})' ,
76
74
errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 17 } ] ,
77
75
} ,
76
+ {
77
+ code : 'describe["each"]()(() => {})' ,
78
+ errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 20 } ] ,
79
+ } ,
78
80
{
79
81
code : 'describe.each("foo")(() => {})' ,
80
82
errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 22 } ] ,
81
83
} ,
84
+ {
85
+ code : 'describe.only.each("foo")(() => {})' ,
86
+ errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 27 } ] ,
87
+ } ,
82
88
{
83
89
code : 'describe(() => {})' ,
84
90
errors : [ { messageId : 'nameAndCallback' , line : 1 , column : 10 } ] ,
0 commit comments