File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,6 @@ import { getCurrentHub, Hub } from '@sentry/core';
2
2
import * as domain from 'domain' ;
3
3
4
4
describe ( 'domains' , ( ) => {
5
- afterEach ( ( ) => {
6
- if ( domain . active ) {
7
- domain . active . exit ( ) ;
8
- }
9
- jest . resetAllMocks ( ) ;
10
- } ) ;
11
-
12
5
test ( 'without domain' , ( ) => {
13
6
expect ( domain . active ) . toBeFalsy ( ) ;
14
7
const hub = getCurrentHub ( ) ;
@@ -33,6 +26,7 @@ describe('domains', () => {
33
26
const d = domain . create ( ) ;
34
27
d . run ( ( ) => {
35
28
expect ( getCurrentHub ( ) ) . toBe ( getCurrentHub ( ) ) ;
29
+ d . exit ( ) ;
36
30
} ) ;
37
31
} ) ;
38
32
@@ -47,6 +41,7 @@ describe('domains', () => {
47
41
48
42
setTimeout ( ( ) => {
49
43
expect ( getCurrentHub ( ) . getStack ( ) [ 1 ] ) . toEqual ( { client : 'process' } ) ;
44
+ d1 . exit ( ) ;
50
45
} , 50 ) ;
51
46
} ) ;
52
47
@@ -57,6 +52,7 @@ describe('domains', () => {
57
52
58
53
setTimeout ( ( ) => {
59
54
expect ( getCurrentHub ( ) . getStack ( ) [ 1 ] ) . toEqual ( { client : 'local' } ) ;
55
+ d2 . exit ( ) ;
60
56
done ( ) ;
61
57
} , 100 ) ;
62
58
} ) ;
You can’t perform that action at this time.
0 commit comments