add some eslint rules for testing-library use in tests

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-16 09:32:58 +01:00
parent fd7ec12ec2
commit cb716004ef
31 changed files with 236 additions and 134 deletions
+4 -4
View File
@@ -57,10 +57,10 @@ const isValidSelection = (newSelection: Selection) => {
};
/**
* Hook for retreiving a selection within the ShadowRoot.
* Hook for retrieving a selection within the ShadowRoot.
* @public
*/
export const useShadowRootSelection = (wait: number = 0) => {
export const useShadowRootSelection = (waitMillis: number = 0) => {
const shadowRoot = useShadowRoot();
const [selection, setSelection] = useState<Selection | null>(null);
const handleSelectionChange = useMemo(
@@ -78,8 +78,8 @@ export const useShadowRootSelection = (wait: number = 0) => {
} else {
setSelection(null);
}
}, wait),
[shadowRoot, setSelection, wait],
}, waitMillis),
[shadowRoot, setSelection, waitMillis],
);
useEffect(() => {