Skip to content

Commit

Permalink
Update packages/tracer/tests/unit/Tracer.test.ts
Browse files Browse the repository at this point in the history
Co-authored-by: ijemmy <[email protected]>
  • Loading branch information
dreamorosi and ijemmy authored Oct 6, 2022
1 parent 9505847 commit 136a63a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/tracer/tests/unit/Tracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,9 @@ describe('Class: Tracer', () => {
// Here we assert that the subsegment.close() (inside the finally of decorator) is called before the other otherDummyMethodSpy method
// that should always be called after the handler has returned. If subsegment.close() is called after it means the
// decorator is NOT awaiting the method which would cause the test to fail.
expect(subsegmentCloseSpy.mock.invocationCallOrder[0]).toBeLessThan(otherDummyMethodSpy.mock.invocationCallOrder[0]);
const dummyCallOrder = subsegmentCloseSpy.mock.invocationCallOrder[0];
const otherDummyCallOrder = otherDummyMethodSpy.mock.invocationCallOrder[0];
expect(dummyCallOrder).toBeLessThan(otherDummyCallOrder);

});

Expand Down

0 comments on commit 136a63a

Please sign in to comment.