build(ts): enable noUncheckedIndexedAccess and isolatedModules

This commit is contained in:
2026-02-20 01:50:09 -08:00
parent 06e8223d63
commit a4532a5fa0
45 changed files with 169 additions and 126 deletions

View File

@@ -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', () => {

View File

@@ -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')));
});

View File

@@ -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']);
});