@@ -181,47 +181,47 @@ ruleTester.run('prefer-hooks-in-order', rule, {
181
181
beforeAll(() => {
182
182
createMyDatabase();
183
183
});
184
-
184
+
185
185
beforeEach(() => {
186
186
seedMyDatabase();
187
187
});
188
-
188
+
189
189
it('accepts this input', () => {
190
190
// ...
191
191
});
192
-
192
+
193
193
it('returns that value', () => {
194
194
// ...
195
195
});
196
-
196
+
197
197
describe('when the database has specific values', () => {
198
198
const specificValue = '...';
199
-
199
+
200
200
beforeEach(() => {
201
201
seedMyDatabase(specificValue);
202
202
});
203
-
203
+
204
204
it('accepts that input', () => {
205
205
// ...
206
206
});
207
-
207
+
208
208
it('throws an error', () => {
209
209
// ...
210
210
});
211
-
211
+
212
212
beforeEach(() => {
213
213
mockLogger();
214
214
});
215
-
215
+
216
216
afterEach(() => {
217
217
clearLogger();
218
218
});
219
-
219
+
220
220
it('logs a message', () => {
221
221
// ...
222
222
});
223
223
});
224
-
224
+
225
225
afterAll(() => {
226
226
removeMyDatabase();
227
227
});
@@ -233,35 +233,35 @@ ruleTester.run('prefer-hooks-in-order', rule, {
233
233
setupTheDatabase();
234
234
createMocks();
235
235
});
236
-
236
+
237
237
beforeAll(() => {
238
238
doEvenMore();
239
239
});
240
-
240
+
241
241
beforeEach(() => {
242
242
cleanTheDatabase();
243
243
resetSomeThings();
244
244
});
245
-
245
+
246
246
afterEach(() => {
247
247
cleanTheDatabase();
248
248
resetSomeThings();
249
249
});
250
-
250
+
251
251
afterAll(() => {
252
252
closeTheDatabase();
253
253
stop();
254
254
});
255
-
255
+
256
256
it('does something', () => {
257
257
const thing = getThing();
258
258
expect(thing).toBe('something');
259
259
});
260
-
260
+
261
261
it('throws', () => {
262
262
// Do something that throws
263
263
});
264
-
264
+
265
265
describe('Also have tests in here', () => {
266
266
afterAll(() => {});
267
267
it('tests something', () => {});
@@ -539,25 +539,25 @@ ruleTester.run('prefer-hooks-in-order', rule, {
539
539
beforeAll(() => {});
540
540
beforeAll(() => {});
541
541
afterAll(() => {});
542
-
542
+
543
543
it('foo nested', () => {
544
544
// this is a test
545
545
});
546
546
547
547
describe('when something is true', () => {
548
548
beforeAll(() => {});
549
549
afterEach(() => {});
550
-
550
+
551
551
it('foo nested', () => {
552
552
// this is a test
553
553
});
554
-
555
- describe('deeply nested', () => {
554
+
555
+ describe('deeply nested', () => {
556
556
afterAll(() => {});
557
557
afterAll(() => {});
558
558
// This comment does nothing
559
559
afterEach(() => {});
560
-
560
+
561
561
it('foo nested', () => {
562
562
// this is a test
563
563
});
@@ -588,15 +588,15 @@ ruleTester.run('prefer-hooks-in-order', rule, {
588
588
setupMocks();
589
589
});
590
590
};
591
-
591
+
592
592
it('foo', () => {
593
593
// this is a test
594
594
});
595
-
595
+
596
596
describe('my nested test', () => {
597
597
afterAll(() => {});
598
598
afterEach(() => {});
599
-
599
+
600
600
it('foo nested', () => {
601
601
// this is a test
602
602
});
@@ -624,47 +624,47 @@ ruleTester.run('prefer-hooks-in-order', rule, {
624
624
beforeEach(() => {
625
625
seedMyDatabase();
626
626
});
627
-
627
+
628
628
beforeAll(() => {
629
629
createMyDatabase();
630
630
});
631
-
631
+
632
632
it('accepts this input', () => {
633
633
// ...
634
634
});
635
-
635
+
636
636
it('returns that value', () => {
637
637
// ...
638
638
});
639
-
639
+
640
640
describe('when the database has specific values', () => {
641
641
const specificValue = '...';
642
-
642
+
643
643
beforeEach(() => {
644
644
seedMyDatabase(specificValue);
645
645
});
646
-
646
+
647
647
it('accepts that input', () => {
648
648
// ...
649
649
});
650
-
650
+
651
651
it('throws an error', () => {
652
652
// ...
653
653
});
654
-
654
+
655
655
afterEach(() => {
656
656
clearLogger();
657
657
});
658
-
658
+
659
659
beforeEach(() => {
660
660
mockLogger();
661
661
});
662
-
662
+
663
663
it('logs a message', () => {
664
664
// ...
665
665
});
666
666
});
667
-
667
+
668
668
afterAll(() => {
669
669
removeMyDatabase();
670
670
});
0 commit comments