File tree Expand file tree Collapse file tree 6 files changed +35
-105
lines changed Expand file tree Collapse file tree 6 files changed +35
-105
lines changed Original file line number Diff line number Diff line change 1
1
import { Hub , Scope } from '@sentry/hub' ;
2
2
import { Event } from '@sentry/types' ;
3
- import { SentryError } from '@sentry/utils/error ' ;
3
+ import { SentryError } from '@sentry/utils' ;
4
4
5
5
import { TestBackend } from '../mocks/backend' ;
6
6
import { TestClient } from '../mocks/client' ;
7
7
import { TestIntegration } from '../mocks/integration' ;
8
8
9
9
const PUBLIC_DSN = 'https://username@domain/path' ;
10
10
11
- jest . mock ( '@sentry/utils/misc' , ( ) => ( {
12
- uuid4 ( ) : string {
13
- return '42' ;
14
- } ,
15
- getGlobalObject ( ) : object {
16
- return {
17
- console : {
18
- log ( ) : void {
19
- // no-empty
11
+ jest . mock ( '@sentry/utils' , ( ) => {
12
+ const original = require . requireActual ( '@sentry/utils' ) ;
13
+ return {
14
+ ...original ,
15
+
16
+ uuid4 ( ) : string {
17
+ return '42' ;
18
+ } ,
19
+ getGlobalObject ( ) : object {
20
+ return {
21
+ console : {
22
+ log ( ) : void {
23
+ // no-empty
24
+ } ,
25
+ warn ( ) : void {
26
+ // no-empty
27
+ } ,
28
+ error ( ) : void {
29
+ // no-empty
30
+ } ,
20
31
} ,
21
- warn ( ) : void {
22
- // no-empty
23
- } ,
24
- error ( ) : void {
25
- // no-empty
26
- } ,
27
- } ,
28
- } ;
29
- } ,
30
- consoleSandbox ( cb : ( ) => any ) : any {
31
- return cb ( ) ;
32
- } ,
33
- } ) ) ;
34
-
35
- jest . mock ( '@sentry/utils/string' , ( ) => ( {
36
- truncate ( str : string ) : string {
37
- return str ;
38
- } ,
39
- } ) ) ;
32
+ } ;
33
+ } ,
34
+ consoleSandbox ( cb : ( ) => any ) : any {
35
+ return cb ( ) ;
36
+ } ,
37
+ truncate ( str : string ) : string {
38
+ return str ;
39
+ } ,
40
+ } ;
41
+ } ) ;
40
42
41
43
describe ( 'BaseClient' , ( ) => {
42
44
beforeEach ( ( ) => {
Original file line number Diff line number Diff line change 1
- import { SentryError } from '@sentry/utils/error ' ;
1
+ import { SentryError } from '@sentry/utils' ;
2
2
3
3
import { Dsn } from '../../src/dsn' ;
4
4
Original file line number Diff line number Diff line change 1
1
import { Event , Options } from '@sentry/types' ;
2
- import { SyncPromise } from '@sentry/utils/syncpromise ' ;
2
+ import { SyncPromise } from '@sentry/utils' ;
3
3
4
4
import { BaseBackend } from '../../src/basebackend' ;
5
5
Original file line number Diff line number Diff line change 1
1
import { TransportOptions } from '@sentry/types' ;
2
- import { SentryError } from '@sentry/utils/error ' ;
2
+ import { SentryError } from '@sentry/utils' ;
3
3
import * as HttpsProxyAgent from 'https-proxy-agent' ;
4
4
5
5
import { HTTPTransport } from '../../src/transports/http' ;
Original file line number Diff line number Diff line change 1
1
import { TransportOptions } from '@sentry/types' ;
2
- import { SentryError } from '@sentry/utils/error ' ;
2
+ import { SentryError } from '@sentry/utils' ;
3
3
import * as HttpsProxyAgent from 'https-proxy-agent' ;
4
4
5
5
import { HTTPSTransport } from '../../src/transports/https' ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments