Debian Codegraph @

test/integration/fixtures/hooks/multiple-hook-error.fixture.js

raw
1 'use strict';
2
3 before(function () {
4 console.log('root before');
5 });
6 beforeEach(function () {
7 console.log('root before each');
8 });
9 describe('1', function () {
10 beforeEach(function () {
11 console.log('1 before each');
12 });
13
14 describe('1-1', function () {
15 before(function () {
16 console.log('1-1 before');
17 });
18 beforeEach(function () {
19 console.log('1-1 before each');
20 throw new Error('1-1 before each hook failed');
21 });
22 it('1-1 test 1', function () {
23 console.log('1-1 test 1');
24 });
25 it('1-1 test 2', function () {
26 console.log('1-1 test 2');
27 });
28 afterEach(function () {
29 console.log('1-1 after each');
30 });
31 after(function () {
32 console.log('1-1 after');
33 throw new Error('1-1 after hook failed');
34 });
35 });
36
37 describe('1-2', function () {
38 before(function () {
39 console.log('1-2 before');
40 });
41 beforeEach(function () {
42 console.log('1-2 before each');
43 });
44 it('1-2 test 1', function () {
45 console.log('1-2 test 1');
46 });
47 it('1-2 test 2', function () {
48 console.log('1-2 test 2');
49 });
50 afterEach(function () {
51 console.log('1-2 after each');
52 throw new Error('1-2 after each hook failed');
53 });
54 after(function () {
55 console.log('1-2 after');
56 });
57 });
58
59 afterEach(function () {
60 console.log('1 after each');
61 });
62
63 after(function () {
64 console.log('1 after');
65 });
66 });
67
68 describe('2', function () {
69 beforeEach(function () {
70 console.log('2 before each');
71 throw new Error('2 before each hook failed');
72 });
73
74 describe('2-1', function () {
75 before(function () {
76 console.log('2-1 before');
77 });
78 beforeEach(function () {
79 console.log('2-1 before each');
80 });
81 it('2-1 test 1', function () {
82 console.log('2-1 test 1');
83 });
84 it('2-1 test 2', function () {
85 console.log('2-1 test 2');
86 });
87 afterEach(function () {
88 console.log('2-1 after each');
89 });
90 after(function () {
91 console.log('2-1 after');
92 });
93 });
94
95 describe('2-2', function () {
96 before(function () {
97 console.log('2-2 before');
98 });
99 beforeEach(function () {
100 console.log('2-2 before each');
101 });
102 it('2-2 test 1', function () {
103 console.log('2-2 test 1');
104 });
105 it('2-2 test 2', function () {
106 console.log('2-2 test 2');
107 });
108 afterEach(function () {
109 console.log('2-2 after each');
110 });
111 after(function () {
112 console.log('2-2 after');
113 });
114 });
115
116 afterEach(function () {
117 console.log('2 after each');
118 throw new Error('2 after each hook failed');
119 });
120
121 after(function () {
122 console.log('2 after');
123 });
124 });
125
126 after(function () {
127 console.log('root after');
128 });
129 afterEach(function () {
130 console.log('root after each');
131 });