Skip to content

Commit 15ae0db

Browse files
committed
test: adopt wording of other tests
1 parent 66d0690 commit 15ae0db

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/rules/consistent-spacing-between-blocks.test.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ runRuleTester('consistent-spacing-between-blocks', rule, {
55
invalid: [
66
{
77
code: javascript`
8-
test.beforeEach('Test 1', () => {});
9-
test('Test 2', async () => {
10-
await test.step('Step 1', () => {});
8+
test.beforeEach('should pass', () => {});
9+
test('should fail', async () => {
10+
await test.step('should pass', () => {});
1111
// a comment
12-
test.step('Step 2', () => {});
13-
test.step('Step 3', () => {});
14-
const foo = await test.step('Step 4', () => {});
15-
foo = await test.step('Step 5', () => {});
12+
test.step('should fail', () => {});
13+
test.step('should fail', () => {});
14+
const foo = await test.step('should fail', () => {});
15+
foo = await test.step('should fail', () => {});
1616
});
1717
/**
1818
* another comment
1919
*/
20-
test('Test 6', () => {});
20+
test('should fail', () => {});
2121
`,
2222
errors: [
2323
{ line: 2, messageId: 'missingWhitespace' },
@@ -29,95 +29,95 @@ runRuleTester('consistent-spacing-between-blocks', rule, {
2929
],
3030
name: 'missing blank lines before test blocks',
3131
output: javascript`
32-
test.beforeEach('Test 1', () => {});
32+
test.beforeEach('should pass', () => {});
3333
34-
test('Test 2', async () => {
35-
await test.step('Step 1', () => {});
34+
test('should fail', async () => {
35+
await test.step('should pass', () => {});
3636
3737
// a comment
38-
test.step('Step 2', () => {});
38+
test.step('should fail', () => {});
3939
40-
test.step('Step 3', () => {});
40+
test.step('should fail', () => {});
4141
42-
const foo = await test.step('Step 4', () => {});
42+
const foo = await test.step('should fail', () => {});
4343
44-
foo = await test.step('Step 5', () => {});
44+
foo = await test.step('should fail', () => {});
4545
});
4646
4747
/**
4848
* another comment
4949
*/
50-
test('Test 6', () => {});
50+
test('should fail', () => {});
5151
`,
5252
},
5353
],
5454
valid: [
5555
{
5656
code: javascript`
57-
test('Test 1', () => {});
57+
test('should pass', () => {});
5858
59-
test('Test 2', () => {});
59+
test('should pass', () => {});
6060
`,
6161
name: 'blank line between simple test blocks',
6262
},
6363
{
6464
code: javascript`
6565
test.beforeEach(() => {});
6666
67-
test.skip('Test 2', () => {});
67+
test.skip('should pass', () => {});
6868
`,
6969
name: 'blank line between test modifiers',
7070
},
7171
{
7272
code: javascript`
73-
test('Test', async () => {
74-
await test.step('Step 1', () => {});
73+
test('should pass', async () => {
74+
await test.step('should pass', () => {});
7575
76-
await test.step('Step 2', () => {});
76+
await test.step('should pass', () => {});
7777
});
7878
`,
7979
name: 'blank line between nested steps in async test',
8080
},
8181
{
8282
code: javascript`
83-
test('Test', async () => {
84-
await test.step('Step 1', () => {});
83+
test('should pass', async () => {
84+
await test.step('should pass', () => {});
8585
8686
// some comment
87-
await test.step('Step 2', () => {});
87+
await test.step('should pass', () => {});
8888
});
8989
`,
9090
name: 'nested steps with a line comment in between',
9191
},
9292
{
9393
code: javascript`
94-
test('Test', async () => {
95-
await test.step('Step 1', () => {});
94+
test('should pass', async () => {
95+
await test.step('should pass', () => {});
9696
9797
/**
9898
* another comment
9999
*/
100-
await test.step('Step 2', () => {});
100+
await test.step('should pass', () => {});
101101
});
102102
`,
103103
name: 'nested steps with a block comment in between',
104104
},
105105
{
106106
code: javascript`
107107
test('assign', async () => {
108-
let foo = await test.step('Step 1', () => {});
108+
let foo = await test.step('should pass', () => {});
109109
110-
foo = await test.step('Step 2', () => {});
110+
foo = await test.step('should pass', () => {});
111111
});
112112
`,
113113
name: 'assignments initialized by test.step',
114114
},
115115
{
116116
code: javascript`
117117
test('assign', async () => {
118-
let { foo } = await test.step('Step 1', () => {});
118+
let { foo } = await test.step('should pass', () => {});
119119
120-
({ foo } = await test.step('Step 2', () => {}));
120+
({ foo } = await test.step('should pass', () => {}));
121121
});
122122
`,
123123
name: 'destructuring assignments initialized by test.step',

0 commit comments

Comments
 (0)