Skip to content
Merged
22 changes: 22 additions & 0 deletions openless-all/app/scripts/check-hotkey-recorder.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as esbuild from 'esbuild';
import { mkdtemp, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';

const tmp = await mkdtemp(join(tmpdir(), 'openless-hotkey-recorder-'));
const outfile = join(tmp, 'hotkey-recorder-test.mjs');

try {
await esbuild.build({
entryPoints: [fileURLToPath(new URL('../src/lib/hotkeyRecorder.test.ts', import.meta.url))],
outfile,
bundle: true,
platform: 'node',
format: 'esm',
logLevel: 'silent',
});
await import(pathToFileURL(outfile).href);
} finally {
await rm(tmp, { recursive: true, force: true });
}
22 changes: 22 additions & 0 deletions openless-all/app/scripts/check-window-hotkey-fallback.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as esbuild from 'esbuild';
import { mkdtemp, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';

const tmp = await mkdtemp(join(tmpdir(), 'openless-window-hotkey-fallback-'));
const outfile = join(tmp, 'window-hotkey-fallback-test.mjs');

try {
await esbuild.build({
entryPoints: [fileURLToPath(new URL('../src/lib/windowHotkeyFallback.test.ts', import.meta.url))],
outfile,
bundle: true,
platform: 'node',
format: 'esm',
logLevel: 'silent',
});
await import(pathToFileURL(outfile).href);
} finally {
await rm(tmp, { recursive: true, force: true });
}
1 change: 1 addition & 0 deletions openless-all/app/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ mod tests {
hotkey: HotkeyBinding {
trigger: HotkeyTrigger::RightControl,
mode: HotkeyMode::Toggle,
..Default::default()
},
qa_hotkey: Some(QaHotkeyBinding {
primary: ";".to_string(),
Expand Down
Loading
Loading