aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cache-map.test.js2
-rw-r--r--test/data/html/test-document2-script.js2
-rw-r--r--test/database.test.js6
-rw-r--r--test/deinflector.test.js2
-rw-r--r--test/hotkey-util.test.js2
-rw-r--r--test/japanese-util.test.js2
-rw-r--r--test/json-schema.test.js2
-rw-r--r--test/options-util.test.js2
-rw-r--r--test/playwright/visual.spec.js4
-rw-r--r--test/profile-conditions-util.test.js2
10 files changed, 21 insertions, 5 deletions
diff --git a/test/cache-map.test.js b/test/cache-map.test.js
index df891188..52ada57c 100644
--- a/test/cache-map.test.js
+++ b/test/cache-map.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import {expect, test} from 'vitest';
import {CacheMap} from '../ext/js/general/cache-map.js';
diff --git a/test/data/html/test-document2-script.js b/test/data/html/test-document2-script.js
index f6082802..d8e1278d 100644
--- a/test/data/html/test-document2-script.js
+++ b/test/data/html/test-document2-script.js
@@ -87,7 +87,7 @@ function toggleFullscreen(element) {
* @param {HTMLElement|DocumentFragment} container
* @param {?Element} [fullscreenElement]
*/
-function setup(container, fullscreenElement=null) {
+function setup(container, fullscreenElement = null) {
const fullscreenLink = container.querySelector('.fullscreen-link');
if (fullscreenLink !== null) {
if (fullscreenElement === null) {
diff --git a/test/database.test.js b/test/database.test.js
index 80871f95..e7774d95 100644
--- a/test/database.test.js
+++ b/test/database.test.js
@@ -107,7 +107,8 @@ function countKanjiWithCharacter(kanji, character) {
/** */
async function testDatabase1() {
- test('Database1', async () => { // Load dictionary data
+ test('Database1', async () => {
+ // Load dictionary data
const testDictionary = createTestDictionaryArchive('valid-dictionary1');
const testDictionarySource = await testDictionary.generateAsync({type: 'arraybuffer'});
const testDictionaryIndex = JSON.parse(await testDictionary.files['index.json'].async('string'));
@@ -849,7 +850,8 @@ async function testFindTagForTitle1(database, title) {
/** */
async function testDatabase2() {
- test('Database2', async () => { // Load dictionary data
+ test('Database2', async () => {
+ // Load dictionary data
const testDictionary = createTestDictionaryArchive('valid-dictionary1');
const testDictionarySource = await testDictionary.generateAsync({type: 'arraybuffer'});
const testDictionaryIndex = JSON.parse(await testDictionary.files['index.json'].async('string'));
diff --git a/test/deinflector.test.js b/test/deinflector.test.js
index bd538428..adb347f1 100644
--- a/test/deinflector.test.js
+++ b/test/deinflector.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import fs from 'fs';
import {fileURLToPath} from 'node:url';
import path from 'path';
diff --git a/test/hotkey-util.test.js b/test/hotkey-util.test.js
index 02622c40..5b8c4e73 100644
--- a/test/hotkey-util.test.js
+++ b/test/hotkey-util.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import {expect, test} from 'vitest';
import {HotkeyUtil} from '../ext/js/input/hotkey-util.js';
diff --git a/test/japanese-util.test.js b/test/japanese-util.test.js
index a0078da0..6e594a2f 100644
--- a/test/japanese-util.test.js
+++ b/test/japanese-util.test.js
@@ -152,7 +152,7 @@ function testConvertKatakanaToHiragana() {
['カーナー', 'かーなー', true]
];
- for (const [string, expected, keepProlongedSoundMarks=false] of data) {
+ for (const [string, expected, keepProlongedSoundMarks = false] of data) {
expect(jp.convertKatakanaToHiragana(string, keepProlongedSoundMarks)).toStrictEqual(expected);
}
});
diff --git a/test/json-schema.test.js b/test/json-schema.test.js
index e534f538..a93e5002 100644
--- a/test/json-schema.test.js
+++ b/test/json-schema.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import {expect, test} from 'vitest';
import {JsonSchema} from '../ext/js/data/json-schema.js';
diff --git a/test/options-util.test.js b/test/options-util.test.js
index 7845d759..f2ffa36c 100644
--- a/test/options-util.test.js
+++ b/test/options-util.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import fs from 'fs';
import url, {fileURLToPath} from 'node:url';
import path from 'path';
diff --git a/test/playwright/visual.spec.js b/test/playwright/visual.spec.js
index 8b48b7c0..b912f8b4 100644
--- a/test/playwright/visual.spec.js
+++ b/test/playwright/visual.spec.js
@@ -72,7 +72,9 @@ test('visual', async ({page, extensionId}) => {
popup_frame = await frame_attached; // wait for popup to be attached
}
try {
- await (await /** @type {import('@playwright/test').Frame} */ (popup_frame).frameElement()).waitForElementState('visible', {timeout: 500}); // some tests don't have a popup, so don't fail if it's not there; TODO: check if the popup is expected to be there
+ // Some tests don't have a popup, so don't fail if it's not there
+ // TODO: check if the popup is expected to be there
+ await (await /** @type {import('@playwright/test').Frame} */ (popup_frame).frameElement()).waitForElementState('visible', {timeout: 500});
} catch (error) {
console.log(test_name + ' has no popup');
}
diff --git a/test/profile-conditions-util.test.js b/test/profile-conditions-util.test.js
index 62b21555..f64ce79c 100644
--- a/test/profile-conditions-util.test.js
+++ b/test/profile-conditions-util.test.js
@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/* eslint-disable no-multi-spaces */
+
import {expect, test} from 'vitest';
import {ProfileConditionsUtil} from '../ext/js/background/profile-conditions-util.js';