From 0e22ca0004e42a84638bc8011a641df69fd9bd78 Mon Sep 17 00:00:00 2001 From: Philipp Fritsche Date: Wed, 20 Oct 2021 17:16:30 +0000 Subject: [PATCH 1/2] fix: prepare document in setup --- src/setup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/setup.ts b/src/setup.ts index d0ce81e2..60718543 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -1,3 +1,4 @@ +import {prepareDocument} from 'document' import {clear} from './clear' import {click, clickOptions, dblClick} from './click' import {hover, unhover} from './hover' @@ -59,7 +60,7 @@ interface SetupOptions * All APIs returned by this function share an input device state and a default configuration. */ export function setup(options: SetupOptions = {}) { - // TODO: prepare our document state workarounds + prepareDocument(options.document ?? document) return _setup(options, { keyboardState: createKeyboardState(), From 42eaf0fba3efa92b6ee820e5881bb6b0deb3f3a2 Mon Sep 17 00:00:00 2001 From: Philipp Fritsche Date: Wed, 20 Oct 2021 17:22:40 +0000 Subject: [PATCH 2/2] relative import --- src/setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup.ts b/src/setup.ts index 60718543..77b558f1 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -1,6 +1,6 @@ -import {prepareDocument} from 'document' import {clear} from './clear' import {click, clickOptions, dblClick} from './click' +import {prepareDocument} from './document' import {hover, unhover} from './hover' import {createKeyboardState, keyboard, keyboardOptions} from './keyboard' import type {keyboardState} from './keyboard/types'