mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
test(core): Stabilize Sentry event bus integration test (#39830)
This commit is contained in:
parent
0cd66905e5
commit
3220953fb4
|
|
@ -336,16 +336,10 @@ test('should send message to sentry ', async () => {
|
|||
sentryDestination.enabled = true;
|
||||
|
||||
const mockedSentryCaptureMessage = vi.spyOn(sentryDestination.sentryClient!, 'captureMessage');
|
||||
mockedSentryCaptureMessage.mockImplementation((_m, _level, _hint, _scope) => {
|
||||
eventBus.confirmMessageDelivered(testMessage, {
|
||||
id: sentryDestination.id,
|
||||
name: sentryDestination.label,
|
||||
});
|
||||
return testMessage.id;
|
||||
});
|
||||
mockedSentryCaptureMessage.mockReturnValue(testMessage.id);
|
||||
|
||||
await eventBus.send(testMessage);
|
||||
await onFirstWorkerMessage('confirmMessageSent', async () => {
|
||||
await vi.waitFor(async () => {
|
||||
await confirmIdInAll(testMessage.id);
|
||||
await confirmIdSent(testMessage.id);
|
||||
expect(mockedSentryCaptureMessage).toHaveBeenCalled();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user