aboutsummaryrefslogtreecommitdiff
path: root/test/hotkey-util.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-16 19:33:24 -0500
committerGitHub <noreply@github.com>2024-02-17 00:33:24 +0000
commit1e69210b53151f31140bb1fbdc9f3d71fa181630 (patch)
treec8e824b531bf0fc46897ee7cf93fe375b5da946e /test/hotkey-util.test.js
parent9432e4bb117869860db0aaa42a318fe73002d1c5 (diff)
Make vitests idiomatic (#677)
Diffstat (limited to 'test/hotkey-util.test.js')
-rw-r--r--test/hotkey-util.test.js21
1 files changed, 2 insertions, 19 deletions
diff --git a/test/hotkey-util.test.js b/test/hotkey-util.test.js
index 01a2b536..6eb3f975 100644
--- a/test/hotkey-util.test.js
+++ b/test/hotkey-util.test.js
@@ -19,8 +19,7 @@
import {describe, expect, test} from 'vitest';
import {HotkeyUtil} from '../ext/js/input/hotkey-util.js';
-/** */
-function testCommandConversions() {
+describe('HotkeyUtil', () => {
describe('CommandConversions', () => {
/* eslint-disable @stylistic/no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, command: string, expectedCommand: string, expectedInput: {key: string, modifiers: import('input').Modifier[]}}[]} */
@@ -53,10 +52,7 @@ function testCommandConversions() {
});
}
});
-}
-/** */
-function testDisplayNames() {
describe('DisplayNames', () => {
/* eslint-disable @stylistic/no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, key: ?string, modifiers: import('input').Modifier[], expected: string}[]} */
@@ -147,10 +143,7 @@ function testDisplayNames() {
expect(displayName).toStrictEqual(expected);
});
});
-}
-/** */
-function testSortModifiers() {
describe('SortModifiers', () => {
/** @type {{modifiers: import('input').Modifier[], expected: import('input').Modifier[]}[]} */
const data = [
@@ -167,14 +160,4 @@ function testSortModifiers() {
});
}
});
-}
-
-
-/** */
-function main() {
- testCommandConversions();
- testDisplayNames();
- testSortModifiers();
-}
-
-main();
+});