test: cut low-value tests, rewrite the rest around behavior, parallelize lanes (#285)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-05 00:07:44 -07:00
1 parent 4b6842d034
commit b48083ddd8
368 files changed
+18045 -60331

No files matched your search

-6
View File
@@ -36,9 +36,3 @@ test('every default session-action binding is accepted by parseSessionActionDisp
);
}
});
test('toggleNotificationHistory dispatch request is accepted', () => {
assert.deepEqual(parseSessionActionDispatchRequest({ actionId: 'toggleNotificationHistory' }), {
actionId: 'toggleNotificationHistory',
});
});
-9
View File
@@ -1,7 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import {
MPV_X11_BACKEND_ARGS,
applyX11EnvOverrides,
isSupportedWaylandCompositor,
shouldForceX11MpvBackend,
@@ -98,11 +97,3 @@ test('applyX11EnvOverrides strips Wayland hints, keeps Hyprland IPC, and pins se
assert.equal(result.SWAYSOCK, undefined);
assert.equal(result.XDG_SESSION_TYPE, 'x11');
});
test('MPV_X11_BACKEND_ARGS pins the window context to X11 without overriding the renderer', () => {
assert.deepEqual([...MPV_X11_BACKEND_ARGS], ['--gpu-context=x11vk,x11egl,x11']);
assert.equal(
MPV_X11_BACKEND_ARGS.some((arg) => arg.startsWith('--vo=') || arg.startsWith('--gpu-api=')),
false,
);
});
-21
View File
@@ -103,27 +103,6 @@ test('readSetupState ignores invalid files and round-trips valid state', () => {
});
});
test('createDefaultSetupState includes v4 command-line launcher defaults', () => {
assert.deepEqual(createDefaultSetupState(), {
version: 4,
status: 'incomplete',
completedAt: null,
completionSource: null,
yomitanSetupMode: null,
lastSeenYomitanDictionaryCount: 0,
pluginInstallStatus: 'unknown',
pluginInstallPathSummary: null,
windowsMpvShortcutPreferences: {
startMenuEnabled: true,
desktopEnabled: true,
},
windowsMpvShortcutLastStatus: 'unknown',
bunInstallStatus: 'unknown',
launcherInstallStatus: 'unknown',
launcherInstallPath: null,
});
});
test('readSetupState migrates v1 state to v4 launcher defaults', () => {
withTempDir((root) => {
const statePath = getSetupStatePath(root);
+21
View File
@@ -72,3 +72,24 @@ test('writeStoredZipAsync writes a correct archive when one entry exceeds the yi
fs.rmSync(dir, { recursive: true, force: true });
}
});
test('writeStoredZip rejects names outside ZIP32 limits', () => {
const dir = makeTempDir();
const outputPath = path.join(dir, 'logs.zip');
try {
assert.throws(
() =>
writeStoredZip(outputPath, [
{
name: `${'a'.repeat(0x10000)}.log`,
data: Buffer.from('log\n', 'utf8'),
},
]),
/ZIP entry name too long/,
);
assert.equal(fs.existsSync(outputPath), false);
} finally {
fs.rmSync(dir, { recursive: true, force: true });
}
});