eslint-plugin-testing-library

ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library

MIT License

Downloads
23.7M
Stars
952
Committers
66

Bot releases are visible (Hide)

eslint-plugin-testing-library - v6.2.1 Latest Release

Published by github-actions[bot] 6 months ago

6.2.1 (2024-04-12)

Bug Fixes

  • await-async-events: false positive reports on awaited expressions evaluating to promise (#890) (767f1be)
eslint-plugin-testing-library - v6.2.0

Published by github-actions[bot] 11 months ago

6.2.0 (2023-11-21)

Features

  • prefer-presence-queries: support react-native matcher toBeOnTheScreen (#844) (b9fef59)
eslint-plugin-testing-library - v6.1.2

Published by github-actions[bot] 12 months ago

6.1.2 (2023-11-09)

Bug Fixes

  • await-async-events: avoid reporting userEvent.setup() in wrappers (#834) (a1bb21e), closes #800
eslint-plugin-testing-library - v6.1.1

Published by github-actions[bot] 12 months ago

6.1.1 (2023-11-09)

Bug Fixes

  • handle multiple imports with no-manual-cleanup (#835) (cb84da2)
eslint-plugin-testing-library - v6.1.0

Published by github-actions[bot] about 1 year ago

6.1.0 (2023-10-12)

Features

eslint-plugin-testing-library - v6.0.2

Published by github-actions[bot] about 1 year ago

6.0.2 (2023-09-23)

Bug Fixes

  • await-async-events: sync userEvent.setup() should not be reported (#817) (c0b6e6f), closes #800
eslint-plugin-testing-library - v6.0.1

Published by github-actions[bot] about 1 year ago

6.0.1 (2023-08-24)

Bug Fixes

  • no-await-sync-events: stop reporting user-event by default (#803) (88246fc)
eslint-plugin-testing-library - v6.0.0

Published by github-actions[bot] about 1 year ago

6.0.0 (2023-08-12)

You can follow the migration guide to v6.

BREAKING CHANGES

  • await-async-query: await-async-query is now called await-async-queries
  • no-await-sync-events: no-await-sync-events is now enabled by default in the DOM, Angular & React configs
  • no-await-sync-query: no-await-sync-query is now called no-await-sync-queries
  • no-debugging-utils: no-debugging-utils now enables all debug methods in all configs by default
  • no-node-access: no-node-access is now enabled by default in the DOM config
  • await-fire-event: await-fire-event is now called await-async-event
  • no-global-regexp-flag-in-query: no-global-regexp-flag-in-query is now enabled by default in all configs
  • no-manual-cleanup: no-manual-cleanup is now enabled by default in the React & Vue configs
  • no-render-in-setup: no-render-in-setup is now called no-render-in-lifecycle
  • prefer-wait-for: prefer-wait-for is now removed

Bug Fixes

  • await-async-event: pluralize to await-async-events (#670) (7238f76)
  • await-async-events: improve fixer (#675) (9d5554c)

Features

  • await-async-event: add basic fixer (#656) (b4b5394)
  • await-async-query: rename to await-async-queries (#665) (c1803df)
  • await-fire-event: rename to await-async-event + add support for user-event (#652) (b4ce9bb)
  • no-await-sync-events: add to DOM, Angular & React configs by default (#667) (afce5ea)
  • no-await-sync-query: rename to no-await-sync-queries (#666) (7ed3da8)
  • no-debugging-utils: enable all debug methods in all configs by default (#663) (e394ce0)
  • no-debugging-utils: warn instead of error in all configs (#662) (8063f8f)
  • no-global-regexp-flag-in-query: add to all configs by default (#660) (c76a7bf)
  • no-manual-cleanup: add to React & Vue configs by default (#659) (8f6ebf5)
  • no-node-access: add to DOM config by default (#661) (8dfe155)
  • no-render-in-setup: rename to no-render-in-lifecycle (#649) (9acba43)
  • prefer-wait-for: remove rule (#648) (20f23ad)
eslint-plugin-testing-library - v6.0.0-alpha.15

Published by github-actions[bot] about 1 year ago

6.0.0-alpha.15 (2023-08-05)

Bug Fixes

  • await-async-util: false positives due to empty strings (#733) (c2b8515)
  • await-async-utils: false positive when destructuring (#722) (34a0a55)
  • deps: update dependencies to latest minor (#753) (9dbd966)
  • prefer-presence-queries: ignore getBy* inside within for on absence queries (#740) (b75dc73)

Features

  • add prefer-query-matchers rule (#750) (31516ad)
  • consistent-data-testid: add support for custom error message (#719) (79b380f), closes #718
eslint-plugin-testing-library - v5.11.1

Published by github-actions[bot] about 1 year ago

5.11.1 (2023-08-05)

Bug Fixes

  • prefer-presence-queries: ignore getBy* inside within on absence queries (#740) (b75dc73)
eslint-plugin-testing-library - v5.11.0

Published by github-actions[bot] over 1 year ago

5.11.0 (2023-05-10)

Features

eslint-plugin-testing-library - v5.10.3

Published by github-actions[bot] over 1 year ago

5.10.3 (2023-04-12)

Bug Fixes

  • deps: update dependencies to latest minor (#753) (9dbd966)
eslint-plugin-testing-library - v5.10.2

Published by github-actions[bot] over 1 year ago

5.10.2 (2023-02-15)

Bug Fixes

  • await-async-util: false positives due to empty strings (#733) (c2b8515)
eslint-plugin-testing-library - v5.10.1

Published by github-actions[bot] over 1 year ago

5.10.1 (2023-02-08)

Bug Fixes

  • await-async-utils: false positive when destructuring (#722) (34a0a55)
eslint-plugin-testing-library - v5.10.0

Published by github-actions[bot] over 1 year ago

5.10.0 (2023-01-23)

Features

  • consistent-data-testid: add support for custom error message (#719) (79b380f), closes #718
eslint-plugin-testing-library - v6.0.0-alpha.14

Published by github-actions[bot] almost 2 years ago

6.0.0-alpha.14 (2022-12-20)

Bug Fixes

  • no-wait-for-side-effects: false negatives in variables declarations (#677) (c3504a7), closes #368
  • prefer-find-by: Respect waitFor options when autofixing (#679) (e31fe03), closes #579

Features

  • no-global-regexp-flag-in-query: Detect global RegExp in variable declarations (#678) (e2ea687), closes #592
  • support handling promises with jest-extended .toResolve & .toRejects (#612) (9576462)
eslint-plugin-testing-library - v5.9.1

Published by github-actions[bot] almost 2 years ago

5.9.1 (2022-10-21)

Bug Fixes

  • prefer-find-by: Respect waitFor options when autofixing (#679) (e31fe03), closes #579
eslint-plugin-testing-library - v5.9.0

Published by github-actions[bot] almost 2 years ago

5.9.0 (2022-10-20)

Features

  • await-async-query, await-async-utils, await-fire-event: support handling promises with jest-extended .toResolve & .toRejects (#612) (9576462)
eslint-plugin-testing-library - v5.8.0

Published by github-actions[bot] almost 2 years ago

5.8.0 (2022-10-19)

Features

  • no-global-regexp-flag-in-query: Detect global RegExp in variable declarations (#678) (e2ea687), closes #592
eslint-plugin-testing-library - v5.7.3

Published by github-actions[bot] about 2 years ago

5.7.3 (2022-10-17)

Bug Fixes

  • no-wait-for-side-effects: false negatives in variables declarations (#677) (c3504a7), closes #368