Skip to content
weftGitHub

Diagnostics

T002

Tautology: expect on a literal, or a value compared with itself.

Fix: Assert on the output of the code under test.

Status in weft@0.1.0: reported by weft check on test files.

Triggers it:

tsx
test('works', () => { expect(true).toBe(true) })

A test that needs it on purpose keeps it with a reason: // weft-allow T002: <why> in the file header (whole file) or on the line above.

More: weft docs testing.