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-focused-tests.md 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Disallow focused tests (`no-focused-tests`)
  2. Jest has a feature that allows you to focus tests by appending `.only` or
  3. prepending `f` to a test-suite or a test-case. This feature is really helpful to
  4. debug a failing test, so you don’t have to execute all of your tests. After you
  5. have fixed your test and before committing the changes you have to remove
  6. `.only` to ensure all tests are executed on your build system.
  7. This rule reminds you to remove `.only` from your tests by raising a warning
  8. whenever you are using the exclusivity feature.
  9. ## Rule Details
  10. This rule looks for every `describe.only`, `it.only`, `test.only`, `fdescribe`,
  11. and `fit` occurrences within the source code. Of course there are some
  12. edge-cases which can’t be detected by this rule e.g.:
  13. ```js
  14. const describeOnly = describe.only;
  15. describeOnly.apply(describe);
  16. ```
  17. The following patterns are considered warnings:
  18. ```js
  19. describe.only('foo', () => {});
  20. it.only('foo', () => {});
  21. describe['only']('bar', () => {});
  22. it['only']('bar', () => {});
  23. test.only('foo', () => {});
  24. test['only']('bar', () => {});
  25. fdescribe('foo', () => {});
  26. fit('foo', () => {});
  27. fit.each`
  28. table
  29. `();
  30. ```
  31. These patterns would not be considered warnings:
  32. ```js
  33. describe('foo', () => {});
  34. it('foo', () => {});
  35. describe.skip('bar', () => {});
  36. it.skip('bar', () => {});
  37. test('foo', () => {});
  38. test.skip('bar', () => {});
  39. it.each()();
  40. it.each`
  41. table
  42. `();
  43. test.each()();
  44. test.each`
  45. table
  46. `();
  47. ```