aboutsummaryrefslogtreecommitdiff
path: root/test/playwright/playwright-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/playwright/playwright-util.js')
-rw-r--r--test/playwright/playwright-util.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/playwright/playwright-util.js b/test/playwright/playwright-util.js
index b9a4831a..653112c6 100644
--- a/test/playwright/playwright-util.js
+++ b/test/playwright/playwright-util.js
@@ -68,16 +68,16 @@ export const mockModelFieldsToAnkiValues = {
/**
* @param {import('playwright').Route} route
- * @returns {Promise<void>|undefined}
+ * @returns {Promise<void>}
*/
-export const mockAnkiRouteHandler = (route) => {
+export async function mockAnkiRouteHandler(route) {
const reqBody = route.request().postDataJSON();
const respBody = ankiRouteResponses[reqBody.action];
if (!respBody) {
return route.abort();
}
- route.fulfill(respBody);
-};
+ await route.fulfill(respBody);
+}
/**
* @param {import('playwright').Page} page