Skip to content

Commit 59c6655

Browse files
authored
test: Refactor lengthy processAlert tests (#1335)
This PR refactors some common setup out of each `processAlert` integration test, as these tests are becoming very lengthy and hard to understand and write. - Common mocks are now performed in beforeEach() instead of in each test - `setupSavedSearchAlertTest` and `createAlertDetails` helpers are introduced to create the objects each test case depends on (connection, source, team, savedSearch, client, webhook, alert, AlertDetails) - `processAlertAtTime` helper is introduced to run `processAlert` at a particular `now` time value, after querying the AlertHistory records that exist at that time. Helps with HDX-2568
1 parent 99cb17c commit 59c6655

File tree

1 file changed

+673
-1353
lines changed

1 file changed

+673
-1353
lines changed

0 commit comments

Comments
 (0)