mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-09 04:19:27 -07:00
fix: stabilize failing test regressions across src and launcher lanes
- Fix log pruning cutoff math using BigInt `mtimeNs` to avoid Bun mtime precision loss - Fix stats CLI lifetime rebuild timestamp units in tests and log output; add `formatLoggedNumber` guard - Use `performance.now()` in subtitle sidebar auto-follow to isolate from test time injection - Harden renderer global cleanup tests with descriptor save/restore instead of assuming globals absent - Isolate `node:http` fallback in stats-server test with stub and assertion - Fix AniSkip fallback title: cleaned basename beats generic parent dirs; episode-only filenames still prefer series directory
This commit is contained in:
@@ -74,6 +74,18 @@ function createListStub() {
|
||||
};
|
||||
}
|
||||
|
||||
test.afterEach(() => {
|
||||
if (Object.prototype.hasOwnProperty.call(globalThis, 'window') && globalThis.window === undefined) {
|
||||
Reflect.deleteProperty(globalThis, 'window');
|
||||
}
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(globalThis, 'document') &&
|
||||
globalThis.document === undefined
|
||||
) {
|
||||
Reflect.deleteProperty(globalThis, 'document');
|
||||
}
|
||||
});
|
||||
|
||||
test('findActiveSubtitleCueIndex prefers timing match before text fallback', () => {
|
||||
const cues = [
|
||||
{ startTime: 1, endTime: 2, text: 'same' },
|
||||
|
||||
Reference in New Issue
Block a user