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