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.

no-deprecated-functions.md 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Disallow use of deprecated functions (`no-deprecated-functions`)
  2. Over the years Jest has accrued some debt in the form of functions that have
  3. either been renamed for clarity, or replaced with more powerful APIs.
  4. While typically these deprecated functions are kept in the codebase for a number
  5. of majors, eventually they are removed completely.
  6. ## Rule details
  7. This rule warns about calls to deprecated functions, and provides details on
  8. what to replace them with, based on the version of Jest that is installed.
  9. This rule can also autofix a number of these deprecations for you.
  10. ### `jest.resetModuleRegistry`
  11. This function was renamed to `resetModules` in Jest 15, and is scheduled for
  12. removal in Jest 27.
  13. ### `jest.addMatchers`
  14. This function was replaced with `expect.extend` in Jest 17, and is scheduled for
  15. removal in Jest 27.
  16. ### `require.requireActual` & `require.requireMock`
  17. These functions were replaced in Jest 21 and removed in Jest 26.
  18. Originally, the `requireActual` & `requireMock` the `requireActual`&
  19. `requireMock` functions were placed onto the `require` function.
  20. These functions were later moved onto the `jest` object in order to be easier
  21. for type checkers to handle, and their use via `require` deprecated. Finally,
  22. the release of Jest 26 saw them removed from the `require` function all
  23. together.
  24. ### `jest.runTimersToTime`
  25. This function was renamed to `advanceTimersByTime` in Jest 22, and is scheduled
  26. for removal in Jest 27.
  27. ### `jest.genMockFromModule`
  28. This function was renamed to `createMockFromModule` in Jest 26, and is scheduled
  29. for removal in a future version of Jest.