Skip to content

Commit 0876149

Browse files
fix: APM test cases
1 parent f218e1f commit 0876149

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/modules/APM.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ describe('APM Module', () => {
6262

6363
it("should throw an error if native startExecutionTrace didn't return an ID", async () => {
6464
mocked(NativeAPM).startExecutionTrace.mockResolvedValueOnce(null);
65-
const name = 'trace';
66-
const promise = APM.startExecutionTrace(name);
67-
const TRACE_NOT_STARTED_APM_NOT_ENABLED = `Execution trace "${name}" wasn't created. Please make sure to enable APM first by following the instructions at this link: https://docs.instabug.com/reference#enable-or-disable-apm`;
65+
const promise = APM.startExecutionTrace('trace');
6866

69-
await expect(promise).rejects.toEqual(TRACE_NOT_STARTED_APM_NOT_ENABLED);
67+
await expect(promise).rejects.toThrowError(/trace "trace" wasn't created/i);
7068
});
7169

7270
it('should resolve with an Trace object if native startExecutionTrace returned an ID', async () => {

0 commit comments

Comments
 (0)