From c25e4c959e226174ff286ab7523eabcc55496bbb Mon Sep 17 00:00:00 2001 From: Darius Jahandarie Date: Thu, 9 Nov 2023 22:45:16 +0900 Subject: Change playwright scripts to use ESM --- test/playwright/integration.spec.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/playwright/integration.spec.js') diff --git a/test/playwright/integration.spec.js b/test/playwright/integration.spec.js index 1bfd39ea..b9a86d84 100644 --- a/test/playwright/integration.spec.js +++ b/test/playwright/integration.spec.js @@ -15,18 +15,18 @@ * along with this program. If not, see . */ -const path = require('path'); -const { - test, +import path from 'path'; +import {createDictionaryArchive} from '../../dev/util'; +import { expect, - root, - mockModelFieldNames, - mockModelFieldsToAnkiValues, expectedAddNoteBody, mockAnkiRouteHandler, + mockModelFieldNames, + mockModelFieldsToAnkiValues, + root, + test, writeToClipboardFromPage -} = require('./playwright-util'); -const {createDictionaryArchive} = require('../../dev/util'); +} from './playwright-util'; test.beforeEach(async ({context}) => { // wait for the on-install welcome.html tab to load, which becomes the foreground tab @@ -91,4 +91,4 @@ test('anki add', async ({context, page, extensionId}) => { await page.locator('[data-mode="term-kanji"]').click(); const addNoteReqBody = await addNotePromise; expect(addNoteReqBody).toMatchObject(expectedAddNoteBody); -}); \ No newline at end of file +}); -- cgit v1.2.3