testing-library / testing-library/eslint-plugin-testing-library
Rules don’t recognize @testing-library/angular/zoneless imports
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 168
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 14
Description
Have you read the Troubleshooting section?
Yes
Plugin version
v7.16.2
ESLint version
v10.7.0
Node.js version
24.18.0
Bug description
Rules that detect Angular Testing Library imports only recognize @testing-library/angular. They do not recognize the secondary zoneless entry point, @testing-library/angular/zoneless, which was introduced in version 19.2.0, so affected rules are silently skipped.
Steps to reproduce
- Enable an Angular Testing Library rule such as testing-library/prefer-screen-queries .
- Import from the zoneless entry point:
import { render } from '@testing-library/angular/zoneless';
const view = await render(MyComponent);
view.getByText('Hello');
Error output/screenshots
No violation is reported for the zoneless import, while the equivalent import from @testing-library/angular is recognized.
ESLint configuration
import testingLibrary from 'eslint-plugin-testing-library';
export default [
{
files: ['**/*.spec.ts'],
...testingLibrary.configs['flat/angular'],
},
];
Rule(s) affected
await-async-events , await-async-queries , await-async-utils , no-await-sync-events , no-await-sync-queries , no-container , no-debugging-utils , no-global-regexp-flag-in-query , no-node-access , no-promise-in-fire-event , no-render-in-lifecycle , no-wait-for-multiple-assertions , no-wait-for-side-effects , no-wait-for-snapshot , prefer-find-by , prefer-presence-queries , prefer-query-by-disappearance , prefer-screen-queries , and render-result-naming-convention
Anything else?
Zoneless ATL was added in https://github.com/testing-library/angular-testing-library/releases/tag/v19.2.0
Do you want to submit a pull request to fix this bug?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the flat/angular configuration and the prefer-screen-queries reproduction using @testing-library/angular/zoneless. Trace how the listed rules recognize @testing-library/angular imports, then verify that equivalent violations are reported for the zoneless entry point across the affected rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, eslint, typescript
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100