Throttle non-critical Sentry messages (#2110)

* Throttle non-critical Sentry messages

* Run all timers in tests
This commit is contained in:
dan 2023-12-06 16:32:47 +00:00 committed by GitHub
parent df55c5fdeb
commit 7229cda5a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 2 deletions

View file

@ -179,6 +179,7 @@ describe('general functionality', () => {
level: 'debug', // Sentry bug, log becomes debug
timestamp: sentryTimestamp,
})
jest.runAllTimers()
expect(Sentry.captureMessage).toHaveBeenCalledWith(message, {
level: 'log',
tags: undefined,
@ -193,6 +194,7 @@ describe('general functionality', () => {
level: 'warning',
timestamp: sentryTimestamp,
})
jest.runAllTimers()
expect(Sentry.captureMessage).toHaveBeenCalledWith(message, {
level: 'warning',
tags: undefined,