Skip to content
RED SAG Skills
hardStudy question · answer published in Automation Testing interview questions, so no pointstest-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