Closed FrozenPandaz closed 4 months ago
@FrozenPandaz fixed the regression, the problem was due to a wrong RE trespassing its scope and affecting other areas. Specifically it was the RE used to check an identifier does not start with digits which did completely avoid digits in identifiers affecting all header tags. Thank you for the prompt report.
its widely affecting jsdom. In tesing library getByRole('heading') not working as well, when this can be fixed?
I can see the issue is in this comparison
temporarly patched the line locally with pnpm patch
// parse, validate and split possible compound selectors
- if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed) {
+ if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed.replace(/\d/g, '')) {
After updating jsdom I am receiving this error too. Breaking all query selectors with h-tags.
Also affecting @testing-library/react
and @testing-library/dom
: SyntaxError: '*[role~="heading"],h1,h2,h3,h4,h5,h6' is not a valid selector
Downgrading to 2.2.7 fixes it.
@ALL the regression should now be fixed by 2.2.9 Please check and confirm so I can close this issue.
Works for us. Thanks for the quick fix!
works after update
@spamshaker @eps1lon thank you for the feedback.
nwsapi@2.2.8
has a regression which causes jsdom to fail sayingh1
is not a valid selector.Run
Repo: https://github.com/FrozenPandaz/jsdom-bug
Error
Version