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-identical-title.md 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Disallow identical titles (`no-identical-title`)
  2. Having identical titles for two different tests or test suites may create
  3. confusion. For example, when a test with the same title as another test in the
  4. same test suite fails, it is harder to know which one failed and thus harder to
  5. fix.
  6. ## Rule Details
  7. This rule looks at the title of every test and test suites. It will report when
  8. two test suites or two test cases at the same level of a test suite have the
  9. same title.
  10. The following patterns are considered warnings:
  11. ```js
  12. describe('foo', () => {
  13. it('should do bar', () => {});
  14. it('should do bar', () => {}); // Has the same title as the previous test
  15. describe('baz', () => {
  16. // ...
  17. });
  18. describe('baz', () => {
  19. // Has the same title as a previous test suite
  20. // ...
  21. });
  22. });
  23. ```
  24. These patterns would not be considered warnings:
  25. ```js
  26. describe('foo', () => {
  27. it('should do foo', () => {});
  28. it('should do bar', () => {});
  29. // Has the same name as a parent test suite, which is fine
  30. describe('foo', () => {
  31. // Has the same name as a test in a parent test suite, which is fine
  32. it('should do foo', () => {});
  33. it('should work', () => {});
  34. });
  35. describe('baz', () => {
  36. // Has the same title as a previous test suite
  37. // Has the same name as a test in a sibling test suite, which is fine
  38. it('should work', () => {});
  39. });
  40. });
  41. ```