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 @@ -16,21 +16,17 @@ addExtensionMethods();
16
16
17
17
const mathRandom = jest . spyOn ( Math , 'random' ) ;
18
18
jest . spyOn ( Transaction . prototype , 'setMetadata' ) ;
19
+ jest . spyOn ( logger , 'warn' ) ;
20
+ jest . spyOn ( logger , 'log' ) ;
21
+ jest . spyOn ( utilsModule , 'isNodeEnv' ) ;
19
22
20
23
// we have to add things into the real global object (rather than mocking the return value of getGlobalObject) because
21
24
// there are modules which call getGlobalObject as they load, which is seemingly too early for jest to intervene
22
25
addDOMPropertiesToGlobal ( [ 'XMLHttpRequest' , 'Event' , 'location' , 'document' ] ) ;
23
26
24
27
describe ( 'Hub' , ( ) => {
25
- beforeEach ( ( ) => {
26
- jest . spyOn ( logger , 'warn' ) ;
27
- jest . spyOn ( logger , 'log' ) ;
28
- jest . spyOn ( utilsModule , 'isNodeEnv' ) ;
29
- } ) ;
30
-
31
28
afterEach ( ( ) => {
32
29
jest . clearAllMocks ( ) ;
33
- jest . useRealTimers ( ) ;
34
30
} ) ;
35
31
36
32
describe ( 'getTransaction()' , ( ) => {
You can’t perform that action at this time.
0 commit comments