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-commented-out-tests.md 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Disallow commented out tests (`no-commented-out-tests`)
  2. This rule raises a warning about commented out tests. It's similar to
  3. no-disabled-tests rule.
  4. ## Rule Details
  5. The rule uses fuzzy matching to do its best to determine what constitutes a
  6. commented out test, checking for a presence of `it(`, `describe(`, `it.skip(`,
  7. etc. in code comments.
  8. The following patterns are considered warnings:
  9. ```js
  10. // describe('foo', () => {});
  11. // it('foo', () => {});
  12. // test('foo', () => {});
  13. // describe.skip('foo', () => {});
  14. // it.skip('foo', () => {});
  15. // test.skip('foo', () => {});
  16. // describe['skip']('bar', () => {});
  17. // it['skip']('bar', () => {});
  18. // test['skip']('bar', () => {});
  19. // xdescribe('foo', () => {});
  20. // xit('foo', () => {});
  21. // xtest('foo', () => {});
  22. /*
  23. describe('foo', () => {});
  24. */
  25. ```
  26. These patterns would not be considered warnings:
  27. ```js
  28. describe('foo', () => {});
  29. it('foo', () => {});
  30. test('foo', () => {});
  31. describe.only('bar', () => {});
  32. it.only('bar', () => {});
  33. test.only('bar', () => {});
  34. // foo('bar', () => {});
  35. ```
  36. ### Limitations
  37. The plugin looks at the literal function names within test code, so will not
  38. catch more complex examples of commented out tests, such as:
  39. ```js
  40. // const testSkip = test.skip;
  41. // testSkip('skipped test', () => {});
  42. // const myTest = test;
  43. // myTest('does not have function body');
  44. ```