Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prefer-to-be-null.md 612B

123456789101112131415161718192021222324252627282930313233
  1. # Suggest using `toBeNull()` (`prefer-to-be-null`)
  2. In order to have a better failure message, `toBeNull()` should be used upon
  3. asserting expectations on null value.
  4. ## Rule details
  5. This rule triggers a warning if `toBe()`, `toEqual()` or `toStrictEqual()` is
  6. used to assert a null value.
  7. ```js
  8. expect(null).toBe(null);
  9. ```
  10. This rule is enabled by default.
  11. ### Default configuration
  12. The following patterns are considered warnings:
  13. ```js
  14. expect(null).toBe(null);
  15. expect(null).toEqual(null);
  16. expect(null).toStrictEqual(null);
  17. ```
  18. The following pattern is not warning:
  19. ```js
  20. expect(null).toBeNull();
  21. ```