Skip to content

Commit

Permalink
fix(j-s): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thorhildurt committed Jan 10, 2025
1 parent b4afe11 commit 239f60e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/judicial-system/scheduler/src/app/test/run.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('AppService - Run', () => {
beforeEach(() => {
mockNow.mockClear()
mockFetch.mockClear()

mockNow.mockReturnValue(new Date('2020-01-01T00:01:00.000Z'))

givenWhenThen = async (): Promise<Then> => {
Expand Down Expand Up @@ -75,7 +76,7 @@ describe('AppService - Run', () => {
body: { type: 'INDICTMENTS_WAITING_FOR_CONFIRMATION' },
},
])
expect(fetch).toHaveBeenCalledTimes(3)
expect(fetch).toHaveBeenCalledTimes(4)
expect(fetch).toHaveBeenCalledWith(
`${appModuleConfig().backendUrl}/api/internal/cases/archive`,
{
Expand All @@ -102,8 +103,8 @@ describe('AppService - Run', () => {
await givenWhenThen()
})

it('should call the backend twice', () => {
expect(fetch).toHaveBeenCalledTimes(2)
it('should call the backend three times', () => {
expect(fetch).toHaveBeenCalledTimes(3)
})
})

Expand Down

0 comments on commit 239f60e

Please sign in to comment.