Skip to content

Commit

Permalink
apps/budgeting/proposal-list/tests: fixing 'empty list' case and 'net…
Browse files Browse the repository at this point in the history
…work error' case in tests
  • Loading branch information
Kha committed Dec 15, 2021
1 parent 3edb7a7 commit 96d4682
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('Budgeting Proposal List without list item (empty)', async () => {
// waiting for async fetching ends --> without this, the
// act(...) console.error will appear
await act(() => mockedFetchEmpty)
const emptyList = screen.queryByText('mock text')
const emptyList = screen.queryAllByText('mock text')
expect(emptyList).toBeTruthy()

// reverse overwrite of global.fetch
Expand Down Expand Up @@ -72,7 +72,7 @@ test('Budgeting Proposal List with fetch error', async () => {

render(<BudgetingProposalList />)
expect(global.fetch).toHaveBeenCalledTimes(1)
const emptyList = screen.queryByText('mock text')
const emptyList = screen.queryAllByText('mock text')
expect(emptyList).toBeTruthy()

// reverse overwrite of global.fetch
Expand Down

0 comments on commit 96d4682

Please sign in to comment.