diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-11-10 00:05:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 00:05:01 +0000 |
commit | 6b51d59fce9c56f3b1e069f620c5064f8cb51406 (patch) | |
tree | 839f379feabe210433278974a975297cec46a97e /test/playwright/integration.spec.js | |
parent | b7d3cef68bc509d0dc907b380f2d1d665aa19149 (diff) | |
parent | 2cd7b14333a727418584d95c71ee6cb10b9a4197 (diff) |
Merge pull request #310 from themoeway/playwright-esm
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 +}); |