diff options
author | James Maa <jmaa@berkeley.edu> | 2024-05-31 08:06:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 15:06:52 +0000 |
commit | 76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 (patch) | |
tree | bdba43d9ba704885383c7f308c6fe3f574c647c5 /test/playwright | |
parent | b3f54747eb2694bdc90bce72e5532e99d374ef08 (diff) |
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule
* Fix dangling commas
Diffstat (limited to 'test/playwright')
-rw-r--r-- | test/playwright/integration.spec.js | 4 | ||||
-rw-r--r-- | test/playwright/playwright-util.js | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/test/playwright/integration.spec.js b/test/playwright/integration.spec.js index bdbe80e3..b9f51700 100644 --- a/test/playwright/integration.spec.js +++ b/test/playwright/integration.spec.js @@ -25,7 +25,7 @@ import { mockAnkiRouteHandler, root, test, - writeToClipboardFromPage + writeToClipboardFromPage, } from './playwright-util.js'; test.beforeEach(async ({context}) => { @@ -71,7 +71,7 @@ test('anki add', async ({context, page, extensionId}) => { await page.locator('input[id="dictionary-import-file-input"]').setInputFiles({ name: 'valid-dictionary1.zip', mimeType: 'application/x-zip', - buffer: Buffer.from(dictionary) + buffer: Buffer.from(dictionary), }); await expect(page.locator('id=dictionaries')).toHaveText('Dictionaries (1 installed, 1 enabled)', {timeout: 5 * 60 * 1000}); diff --git a/test/playwright/playwright-util.js b/test/playwright/playwright-util.js index bebbf08c..d8ecafa2 100644 --- a/test/playwright/playwright-util.js +++ b/test/playwright/playwright-util.js @@ -32,8 +32,8 @@ export const test = base.extend({ args: [ '--headless=new', `--disable-extensions-except=${pathToExtension}`, - `--load-extension=${pathToExtension}` - ] + `--load-extension=${pathToExtension}`, + ], }); await use(context); await context.close(); @@ -46,7 +46,7 @@ export const test = base.extend({ const extensionId = background.url().split('/')[2]; await use(extensionId); - } + }, }); export const expect = test.expect; @@ -59,7 +59,7 @@ export function getMockModelFields() { ['Word', '{expression}'], ['Reading', '{furigana-plain}'], ['Sentence', '{clipboard-text}'], - ['Audio', '{audio}'] + ['Audio', '{audio}'], ]); } @@ -78,7 +78,7 @@ export async function mockAnkiRouteHandler(route) { const responseJson = { status: 200, contentType: 'text/json', - body: JSON.stringify(body) + body: JSON.stringify(body), }; await route.fulfill(responseJson); } catch { @@ -108,7 +108,7 @@ export function getExpectedAddNoteBody() { Word: '読む', Reading: '読[よ]む', Audio: '[sound:mock_audio.mp3]', - Sentence: '読むの例文' + Sentence: '読むの例文', }, tags: ['yomitan'], deckName: 'Mock Deck', @@ -119,11 +119,11 @@ export function getExpectedAddNoteBody() { duplicateScopeOptions: { deckName: null, checkChildren: false, - checkAllModels: false - } - } - } - } + checkAllModels: false, + }, + }, + }, + }, }; } |