@@ -5,6 +5,7 @@ import { QvacScheduler } from '../daemon/qvac-scheduler.js';
|
||||
import { JarvisDaemon } from '../daemon/index.js';
|
||||
import { HarnessBridge } from '../daemon/harness-bridge.js';
|
||||
import { spokenReply } from '../skills/voice-prompt.js';
|
||||
import { voiceSettings } from '../daemon/voice-settings.js';
|
||||
|
||||
test('voice state machine handles wake, reply, cancel, and idle sleep', () => {
|
||||
let now = 0;
|
||||
@@ -37,6 +38,13 @@ test('spoken replies use harness text and strip HUD sidecars', () => {
|
||||
assert.equal(spokenReply('[object Object]'), '');
|
||||
});
|
||||
|
||||
test('voice settings default TTS on and honor an explicit disable', () => {
|
||||
assert.equal(voiceSettings({}).ttsEnabled, true);
|
||||
assert.equal(voiceSettings({ ttsEnabled: true }).ttsEnabled, true);
|
||||
assert.equal(voiceSettings({ ttsEnabled: false }).ttsEnabled, false);
|
||||
assert.equal(voiceSettings({ tts_enabled: false }).ttsEnabled, false);
|
||||
});
|
||||
|
||||
test('ask extracts harness reply text instead of stringifying the object', async () => {
|
||||
const daemon = new JarvisDaemon();
|
||||
daemon.harness = { ask: async () => ({ ok: true, text: 'Hello there.', reason: 'stop' }), cancel() {}, close: async () => {} };
|
||||
|
||||
Reference in New Issue
Block a user