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-undefined.md 688B

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