diff --git a/src/core/services/subtitle-processing-controller.test.ts b/src/core/services/subtitle-processing-controller.test.ts index a64fb5c4..0453b93d 100644 --- a/src/core/services/subtitle-processing-controller.test.ts +++ b/src/core/services/subtitle-processing-controller.test.ts @@ -585,9 +585,11 @@ test('refreshCurrentSubtitle reports the empty-text emit that an in-flight run w resolveFirst?.({ text: '字幕', tokens: [] }); await flushMicrotasks(); await flushMicrotasks(); + // '字幕' is the provisional plain emit the in-flight run already made before + // the refresh; '' is the emit the refresh promised. assert.deepEqual( emitted.map((payload) => payload.text), - [''], + ['字幕', ''], ); }); diff --git a/src/main/main-wiring.test.ts b/src/main/main-wiring.test.ts index d7599cc1..82beb5a6 100644 --- a/src/main/main-wiring.test.ts +++ b/src/main/main-wiring.test.ts @@ -620,7 +620,7 @@ test('subtitle broadcasts share one frequency options snapshot per emitted paylo test('annotation upgrades skip the duplicate basic websocket event', () => { const source = readMainSource(); const emitBlock = source.match( - /function emitSubtitlePayload\(payload: SubtitleData\): void \{(?[\s\S]*?)\n\}/, + /function emitSubtitlePayload\([\s\S]*?\): void \{(?[\s\S]*?)\n\}/, )?.groups?.body; assert.ok(emitBlock);