diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-11-09 22:45:16 +0900 |
---|---|---|
committer | Darius Jahandarie <djahandarie@gmail.com> | 2023-11-09 22:45:16 +0900 |
commit | c25e4c959e226174ff286ab7523eabcc55496bbb (patch) | |
tree | 6d665cd55128760943216784c2b9144f5a0a2b48 /test/playwright/integration.spec.js | |
parent | b7d3cef68bc509d0dc907b380f2d1d665aa19149 (diff) |
Change playwright scripts to use ESM
Diffstat (limited to 'test/playwright/integration.spec.js')
-rw-r--r-- | test/playwright/integration.spec.js | 18 |
1 files changed, 9 insertions, 9 deletions
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 <https://www.gnu.org/licenses/>. */ -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 +}); |