summaryrefslogtreecommitdiff
path: root/test/hotkey-util.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-27 04:01:37 -0500
committerGitHub <noreply@github.com>2024-01-27 09:01:37 +0000
commit7a142bbafd6aa6ca5fe296ba3012158d8f2e75dc (patch)
tree698be195228b5b739a2acf77e34906b56fb80eca /test/hotkey-util.test.js
parenta3224f688f44c9c913f32add1223e922ce88e65a (diff)
Remove unneeded eslint disables (#554)
* Install eslint-plugin-eslint-comments * Update rules, fix issues
Diffstat (limited to 'test/hotkey-util.test.js')
-rw-r--r--test/hotkey-util.test.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/hotkey-util.test.js b/test/hotkey-util.test.js
index f87d0ffd..0a76d0f2 100644
--- a/test/hotkey-util.test.js
+++ b/test/hotkey-util.test.js
@@ -16,14 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-/* eslint-disable no-multi-spaces */
-
import {describe, expect, test} from 'vitest';
import {HotkeyUtil} from '../ext/js/input/hotkey-util.js';
/** */
function testCommandConversions() {
describe('CommandConversions', () => {
+ /* eslint-disable no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, command: string, expectedCommand: string, expectedInput: {key: string, modifiers: import('input').Modifier[]}}[]} */
const data = [
{os: 'win', command: 'Alt+F', expectedCommand: 'Alt+F', expectedInput: {key: 'KeyF', modifiers: ['alt']}},
@@ -41,6 +40,7 @@ function testCommandConversions() {
{os: 'linux', command: 'MacCtrl+Alt+Shift+F1', expectedCommand: 'Ctrl+Alt+Shift+F1', expectedInput: {key: 'F1', modifiers: ['ctrl', 'alt', 'shift']}},
{os: 'linux', command: 'Command+Alt+Shift+F1', expectedCommand: 'Command+Alt+Shift+F1', expectedInput: {key: 'F1', modifiers: ['meta', 'alt', 'shift']}}
];
+ /* eslint-enable no-multi-spaces */
const hotkeyUtil = new HotkeyUtil();
for (const {command, os, expectedInput, expectedCommand} of data) {
@@ -58,6 +58,7 @@ function testCommandConversions() {
/** */
function testDisplayNames() {
describe('DisplayNames', () => {
+ /* eslint-disable no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, key: ?string, modifiers: import('input').Modifier[], expected: string}[]} */
const data = [
{os: 'win', key: null, modifiers: [], expected: ''},
@@ -136,6 +137,7 @@ function testDisplayNames() {
{os: 'unknown', key: 'KeyF', modifiers: ['mouse1'], expected: 'Mouse 1 + F'},
{os: 'unknown', key: 'F1', modifiers: ['mouse1'], expected: 'Mouse 1 + F1'}
];
+ /* eslint-enable no-multi-spaces */
const hotkeyUtil = new HotkeyUtil();