Skip to content

Commit 0ea3c6e

Browse files
committed
refactor: remove useless object spread in tests
1 parent c53e996 commit 0ea3c6e

6 files changed

Lines changed: 90 additions & 450 deletions

File tree

test/rules/sort-classes.test.ts

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,11 +2791,7 @@ describe(ruleName, () => {
27912791
b = () => null
27922792
}
27932793
`,
2794-
options: [
2795-
{
2796-
...options,
2797-
},
2798-
],
2794+
options: [options],
27992795
},
28002796
],
28012797
invalid: [],
@@ -3117,11 +3113,7 @@ describe(ruleName, () => {
31173113
c = 10
31183114
}
31193115
`,
3120-
options: [
3121-
{
3122-
...options,
3123-
},
3124-
],
3116+
options: [options],
31253117
},
31263118
],
31273119
valid: [],
@@ -3295,11 +3287,7 @@ describe(ruleName, () => {
32953287
static a = Class.b.bMethod().anotherNestedMethod(this.c).finalMethod()
32963288
}
32973289
`,
3298-
options: [
3299-
{
3300-
...options,
3301-
},
3302-
],
3290+
options: [options],
33033291
},
33043292
],
33053293
invalid: [],
@@ -3745,11 +3733,7 @@ describe(ruleName, () => {
37453733
static #a = this.#b
37463734
}
37473735
`,
3748-
options: [
3749-
{
3750-
...options,
3751-
},
3752-
],
3736+
options: [options],
37533737
},
37543738
{
37553739
code: dedent`
@@ -3758,11 +3742,7 @@ describe(ruleName, () => {
37583742
static #a = this.#b()
37593743
}
37603744
`,
3761-
options: [
3762-
{
3763-
...options,
3764-
},
3765-
],
3745+
options: [options],
37663746
},
37673747
{
37683748
code: dedent`
@@ -7010,11 +6990,7 @@ describe(ruleName, () => {
70106990
messageId: 'unexpectedClassesGroupOrder',
70116991
},
70126992
],
7013-
options: [
7014-
{
7015-
...options,
7016-
},
7017-
],
6993+
options: [options],
70186994
},
70196995
],
70206996
valid: [
@@ -8716,11 +8692,7 @@ describe(ruleName, () => {
87168692
b
87178693
}
87188694
`,
8719-
options: [
8720-
{
8721-
...options,
8722-
},
8723-
],
8695+
options: [options],
87248696
},
87258697
],
87268698
valid: [],

test/rules/sort-enums.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,11 +3005,7 @@ describe(ruleName, () => {
30053005
b = 1,
30063006
}
30073007
`,
3008-
options: [
3009-
{
3010-
...options,
3011-
},
3012-
],
3008+
options: [options],
30133009
},
30143010
],
30153011
valid: [],

0 commit comments

Comments
 (0)