.not

If you know how to test something, .not lets you test its opposite. For example, this code tests that the best La Croix flavor is not coconut:

  1. test('the best flavor is not coconut', () => {
  2. expect(bestLaCroixFlavor()).not.toBe('coconut');
  3. });