Skip to content

Commit

Permalink
[APM] Attempt to fix APMEventClient unit test (elastic#193049)
Browse files Browse the repository at this point in the history
fixes elastic#190703

## Summary

The problem seems to be on the `void` keyword used when calling
`incomingRequest.abort()`.

I ran a few tests changing the `setTimeout` interval with and without
using the `void` keyword, and the test always passed when running
without it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
crespocarlos and elasticmachine authored Sep 17, 2024
1 parent 77fe423 commit f4fe0bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ describe('APMEventClient', () => {
resolve(undefined);
}, 100);
});

void incomingRequest.abort();
}, 100);
}, 200);
});

expect(abortSignal?.aborted).toBe(true);
Expand Down

0 comments on commit f4fe0bd

Please sign in to comment.