Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
expect(foo).toBeTruthy()
expectTypeOf(foo).toBeTruthy()
expect(foo).toBeFalsy()
expectTypeOf(foo).toBeFalsy()expect(foo).toBe(true)
expectTypeOf(foo).toBe(true)
expect(foo).toBe(false)
expectTypeOf(foo).toBe(false)Popular · 1 of 9
Enforce using toBe(true) and toBe(false) over matchers that coerce types to boolean
expect(foo).toBeTruthy()
expectTypeOf(foo).toBeTruthy()
expect(foo).toBeFalsy()
expectTypeOf(foo).toBeFalsy()expect(foo).toBe(true)
expectTypeOf(foo).toBe(true)
expect(foo).toBe(false)
expectTypeOf(foo).toBe(false)