Skip to content

Commit 2816853

Browse files
feat(queryconfig): Add scope to query extension for test
By adding ":scope >" to the css selector we avoid returning duplicate results if anybody wants to extend this test in the future.
1 parent e7b9f06 commit 2816853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/__node_tests__/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test('works with a custom configured element query for shadow dom elements', asy
131131

132132
// Given I have a naive query that allows searching shadow dom
133133
const queryMeAndChildrenAndShadow = (element, query) => [
134-
...element.querySelectorAll(query),
134+
...element.querySelectorAll(`:scope > ${query}`),
135135
...[...element.children].reduce(
136136
(result, child) => [
137137
...result,

0 commit comments

Comments
 (0)