Skip to content

Commit

Permalink
feat(queryconfig): Add scope to query extension for test
Browse files Browse the repository at this point in the history
By adding ":scope >" to the css selector we avoid
returning duplicate results if anybody wants to
extend this test in the future.
  • Loading branch information
MatthiasKainer committed Nov 16, 2021
1 parent 80a01fe commit 40b849c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/__node_tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ test('works with a custom configured element query for shadow dom elements', asy

// Given I have a naive query that allows searching shadow dom
const queryMeAndChildrenAndShadow = (element, query) => [
...element.querySelectorAll(query),
...element.querySelectorAll(`:scope > ${query}`),
...[...element.children].reduce(
(result, child) => [
...result,
Expand Down

0 comments on commit 40b849c

Please sign in to comment.