Skip to content

feat: support shadow-dom-testing-library#1277

Open
Sysix wants to merge 8 commits intotesting-library:mainfrom
Sysix:feat-shadow-dom-testing-library
Open

feat: support shadow-dom-testing-library#1277
Sysix wants to merge 8 commits intotesting-library:mainfrom
Sysix:feat-shadow-dom-testing-library

Conversation

@Sysix
Copy link
Copy Markdown

@Sysix Sysix commented Mar 30, 2026

Checks

Changes

  • added shadow-dom-testing-library to the known modules
  • added getByShadow* methods to ALL_QUERIES_METHODS
  • added tests cases where the rules would fail. Some rules are respecting the new library too, but should not. These should be covered by type linting
  • extend no-test-id rule to check for method too

Context

fixes #1242

@Sysix Sysix marked this pull request as ready for review March 30, 2026 17:48
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (0ae6bd6) to head (100f9e4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1277   +/-   ##
=======================================
  Coverage   97.35%   97.36%           
=======================================
  Files          49       49           
  Lines        6020     6033   +13     
  Branches     1544     1545    +1     
=======================================
+ Hits         5861     5874   +13     
  Misses        157      157           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Sysix
Copy link
Copy Markdown
Author

Sysix commented Mar 30, 2026

@KonnorRogers would be great to have a quick review from you too ❤️

@Belco90 Belco90 added the enhancement New feature or request label Mar 30, 2026
@Belco90 Belco90 self-requested a review March 30, 2026 18:54
@Sysix
Copy link
Copy Markdown
Author

Sysix commented Apr 8, 2026

@Belco90 I rebased the PR, if the tests are failing again for some node versions, I would like to get a little hint how to resolve it :)

@Belco90
Copy link
Copy Markdown
Member

Belco90 commented Apr 9, 2026

@Belco90 I rebased the PR, if the tests are failing again for some node versions, I would like to get a little hint how to resolve it :)

I'm not entirely sure what's causing the failures, to be honest. I see that prefer-find-by.test.ts has too many tests after adding the new framework (+9000 tests), but that doesn't seem to be an issue for Node v18 and v20. Does it work locally for the problematic Node versions?

Signed-off-by: Alexander S. <sysix@sysix-coding.de>
@Sysix
Copy link
Copy Markdown
Author

Sysix commented Apr 9, 2026

It works with node v24.12.0 & eslint 9:

sysix@DESKTOP-H2E9RIR:~/dev/eslint-plugin-testing-library$ pnpm list eslint
Legend: production dependency, optional only, dev only

eslint-plugin-testing-library@0.0.0-semantically-released /home/sysix/dev/eslint-plugin-testing-library
│
│   devDependencies:
└── eslint@9.35.0

1 package
sysix@DESKTOP-H2E9RIR:~/dev/eslint-plugin-testing-library$ node -v
v24.12.0

I commented out the library for one rule-test, the CI logs shows over 9000 test cases.

@Belco90
Copy link
Copy Markdown
Member

Belco90 commented Apr 10, 2026

I commented out the library for one rule-test, the CI logs shows over 9000 test cases.

@Sysix it didn't make any difference... This needs further investigation, but can't do it now. Should be easy to reproduce by using the same Node version than in CI.

@Sysix
Copy link
Copy Markdown
Author

Sysix commented Apr 12, 2026

@Belco90 I tested it with different node versions, matching the CI env, and with ESLint v10. I could not identify the problem.
I asked GitHub Copilot to explain the error, the --maxWorkers was their solution 🤷

My guess is removing the new test-cases will not "overload" to node thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants