mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
build(ts): enable noUncheckedIndexedAccess and isolatedModules
This commit is contained in:
@@ -29,7 +29,7 @@ test('manual anilist setup submission forwards access token to callback consumer
|
||||
const handled = handleSubmission('subminer://anilist-setup?access_token=abc123');
|
||||
assert.equal(handled, true);
|
||||
assert.equal(consumed.length, 1);
|
||||
assert.ok(consumed[0].includes('https://anilist.subminer.moe/#access_token=abc123'));
|
||||
assert.ok(consumed[0]!.includes('https://anilist.subminer.moe/#access_token=abc123'));
|
||||
});
|
||||
|
||||
test('maybe focus anilist setup window focuses existing window', () => {
|
||||
@@ -179,7 +179,7 @@ test('anilist setup did-fail-load handler forwards details', () => {
|
||||
});
|
||||
|
||||
assert.equal(seen.length, 1);
|
||||
assert.equal(seen[0].errorCode, -3);
|
||||
assert.equal(seen[0]!.errorCode, -3);
|
||||
});
|
||||
|
||||
test('anilist setup did-finish-load handler triggers fallback on blank page', () => {
|
||||
|
||||
@@ -49,8 +49,8 @@ test('createLaunchMpvIdleForJellyfinPlaybackHandler builds expected mpv args', (
|
||||
|
||||
launch();
|
||||
assert.equal(spawnedArgs.length, 1);
|
||||
assert.ok(spawnedArgs[0].includes('--idle=yes'));
|
||||
assert.ok(spawnedArgs[0].some((arg) => arg.includes('--input-ipc-server=/tmp/subminer.sock')));
|
||||
assert.ok(spawnedArgs[0]!.includes('--idle=yes'));
|
||||
assert.ok(spawnedArgs[0]!.some((arg) => arg.includes('--input-ipc-server=/tmp/subminer.sock')));
|
||||
assert.ok(logs.some((entry) => entry.includes('Launched mpv for Jellyfin playback')));
|
||||
});
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ test('tray menu template contains expected entries and handlers', () => {
|
||||
});
|
||||
|
||||
assert.equal(template.length, 7);
|
||||
template[0].click?.();
|
||||
template[5].type === 'separator' ? calls.push('separator') : calls.push('bad');
|
||||
template[6].click?.();
|
||||
template[0]!.click?.();
|
||||
template[5]!.type === 'separator' ? calls.push('separator') : calls.push('bad');
|
||||
template[6]!.click?.();
|
||||
assert.deepEqual(calls, ['overlay', 'separator', 'quit']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user