mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-29 19:21:33 -07:00
99401e5a70
- Retime local English sidecars against the Japanese sidecar via alass before populating sentence card translation fields; cache retimed copies for the process lifetime - Reject reversed or non-positive subtitle timings in immersion tracker and before media generation - Fix word card mining so sentence audio goes to SentenceAudio (not ExpressionAudio) and English subtitle text is not written to SelectionText - Consolidate 10 individual change fragments into stats-updates.md
26 lines
948 B
TypeScript
26 lines
948 B
TypeScript
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
import test from 'node:test';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const WORD_DETAIL_PANEL_PATH = path.resolve(
|
|
path.dirname(fileURLToPath(import.meta.url)),
|
|
'WordDetailPanel.tsx',
|
|
);
|
|
|
|
test('WordDetailPanel uses the shared stats mining payload builder', () => {
|
|
const source = fs.readFileSync(WORD_DETAIL_PANEL_PATH, 'utf8');
|
|
|
|
assert.match(source, /buildStatsMineCardParams/);
|
|
assert.match(source, /getStatsMineCardUnavailableReason/);
|
|
assert.match(source, /buildStatsMineCardParams\(\s*occ,\s*data!\.detail\.headword,\s*mode\s*\)/);
|
|
});
|
|
|
|
test('WordDetailPanel shows partial media mining errors instead of silent success', () => {
|
|
const source = fs.readFileSync(WORD_DETAIL_PANEL_PATH, 'utf8');
|
|
|
|
assert.match(source, /getStatsMineCardError/);
|
|
assert.match(source, /const responseError = getStatsMineCardError\(result\);/);
|
|
});
|