Skip to content

Commit 97d161a

Browse files
committed
delete invokeClient
1 parent 38eabe3 commit 97d161a

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

packages/minimal/src/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,6 @@ function callOnHub<T>(method: string, ...args: any[]): T {
2929
throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);
3030
}
3131

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-
4732
/**
4833
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
4934
*

packages/minimal/test/lib/minimal.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getCurrentHub, getHubFromCarrier, Scope } from '@sentry/hub';
22

33
import {
4-
_callOnClient,
54
captureEvent,
65
captureException,
76
captureMessage,
@@ -196,17 +195,6 @@ describe('Minimal', () => {
196195
expect(getCurrentHub().getClient()).toBe(TestClient.instance);
197196
});
198197

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-
210198
test('does not throw an error when pushing different clients', () => {
211199
init({});
212200
expect(() => {

0 commit comments

Comments
 (0)