Skip to content
RED SAGSkills
hard20 pts · first answer countstest-automationunit-testingassertions

A test that can never fail

Why does this test always pass, even when no "Overdue" invoice exists?

test('flags overdue invoices', () => {
  const invoices = getInvoices()
  invoices.filter((i) => i.status === 'Overdue').forEach((i) => {
    expect(i.reminderSent).toBe(true)
  })
})
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions