-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
has to-upstream testThis bug has a failing to-upstream web platform test waiting to be fixedThis bug has a failing to-upstream web platform test waiting to be fixedmetr upliftA candidate for the METR Uplift experimentA candidate for the METR Uplift experimentselectorsCSS Selectors supportCSS Selectors support
Description
Basic info:
- Node.js version: 16.14.0
- jest version: 27.4.7
Minimal reproduction case
/**
* @jest-environment jsdom
*/
describe('case-insensitive attributes ', () => {
it('1: lower case flag', () => {
const selector = 'div[class=CasE i]';
expect(document.querySelectorAll(selector).length).toBe(0);
});
// fails with error:
// SyntaxError: 'div[class=CasE I]' is not a valid selector
it('2: upper case flag', () => {
const selector = 'div[class=CasE I]';
expect(document.querySelectorAll(selector).length).toBe(0);
});
});
How does similar code behave in browsers?
standard document.querySelectorAll() method does not fail on upper case flag I
https://jsbin.com/jukodeluso/edit?html,js,console
it is allowed and described in docs
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#syntax
Metadata
Metadata
Assignees
Labels
has to-upstream testThis bug has a failing to-upstream web platform test waiting to be fixedThis bug has a failing to-upstream web platform test waiting to be fixedmetr upliftA candidate for the METR Uplift experimentA candidate for the METR Uplift experimentselectorsCSS Selectors supportCSS Selectors support