(options: Partial<TestClientOptions> = {})
| 106 | } |
| 107 | |
| 108 | export function setupTestClient(options: Partial<TestClientOptions> = {}): TestClient { |
| 109 | getCurrentScope().clear(); |
| 110 | getIsolationScope().clear(); |
| 111 | getGlobalScope().clear(); |
| 112 | |
| 113 | const finalOptions = getDefaultTestClientOptions({ tracesSampleRate: 1.0, ...options }); |
| 114 | const client = new TestClient(finalOptions); |
| 115 | setCurrentClient(client); |
| 116 | client.init(); |
| 117 | |
| 118 | // @ts-expect-error Only available on ReactNativeClient |
| 119 | client.emit('afterInit'); |
| 120 | |
| 121 | return client; |
| 122 | } |
no test coverage detected