File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -29,21 +29,6 @@ function callOnHub<T>(method: string, ...args: any[]): T {
29
29
throw new Error ( `No hub defined or ${ method } was not found on the hub, please open a bug report.` ) ;
30
30
}
31
31
32
- /**
33
- * Calls a function on the latest client. Use this with caution, it's meant as
34
- * in "internal" helper so we don't need to expose every possible function in
35
- * the shim. It is not guaranteed that the client actually implements the
36
- * function.
37
- *
38
- * @param method The method to call on the client/client.
39
- * @param args Arguments to pass to the client/fontend.
40
- * @hidden
41
- */
42
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
- export function _callOnClient ( method : string , ...args : any [ ] ) : void {
44
- callOnHub < void > ( '_invokeClient' , method , ...args ) ;
45
- }
46
-
47
32
/**
48
33
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
49
34
*
Original file line number Diff line number Diff line change 1
1
import { getCurrentHub , getHubFromCarrier , Scope } from '@sentry/hub' ;
2
2
3
3
import {
4
- _callOnClient ,
5
4
captureEvent ,
6
5
captureException ,
7
6
captureMessage ,
@@ -196,17 +195,6 @@ describe('Minimal', () => {
196
195
expect ( getCurrentHub ( ) . getClient ( ) ) . toBe ( TestClient . instance ) ;
197
196
} ) ;
198
197
199
- test ( 'Calls function on the client' , done => {
200
- const s = jest . spyOn ( TestClient . prototype , 'mySecretPublicMethod' ) ;
201
- getCurrentHub ( ) . withScope ( ( ) => {
202
- getCurrentHub ( ) . bindClient ( new TestClient ( { } ) as any ) ;
203
- _callOnClient ( 'mySecretPublicMethod' , 'test' ) ;
204
- expect ( s . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'test' ) ;
205
- s . mockRestore ( ) ;
206
- done ( ) ;
207
- } ) ;
208
- } ) ;
209
-
210
198
test ( 'does not throw an error when pushing different clients' , ( ) => {
211
199
init ( { } ) ;
212
200
expect ( ( ) => {
You can’t perform that action at this time.
0 commit comments