mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-17 12:18:31 -07:00
22 lines
664 B
TypeScript
22 lines
664 B
TypeScript
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
|
|
import { applyOverlayClickThrough } from './overlay-click-through';
|
|
|
|
test('applyOverlayClickThrough requests forwarding only off Windows', () => {
|
|
const calls: Array<{ ignore: boolean; forward: boolean }> = [];
|
|
const window = {
|
|
setIgnoreMouseEvents: (ignore: boolean, options?: { forward?: boolean }) => {
|
|
calls.push({ ignore, forward: options?.forward === true });
|
|
},
|
|
};
|
|
|
|
applyOverlayClickThrough(window, true);
|
|
applyOverlayClickThrough(window, false);
|
|
|
|
assert.deepEqual(calls, [
|
|
{ ignore: true, forward: false },
|
|
{ ignore: true, forward: true },
|
|
]);
|
|
});
|