mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-08-19 09:40:19 +00:00
The test I added in #155 ran unconditionally, which broke `npm test` without credentials — the path husky's pre-commit hook takes, so `npm version patch` could not commit. Two causes, both addressed: - no credential gate, unlike every other vendor test in this file. Now skips without INWORLD_API_KEY, and closes its redis client on that path so the run can still exit. - it assumed streaming was enabled. The Google non-streaming test sets JAMBONES_DISABLE_TTS_STREAMING and, on its no-credentials skip path, deletes the env var WITHOUT clearing the require cache (unlike its finally block, which clears both) — so lib/config still held 'true' further down the file and synthInworld took the non-streaming branch, attempting a real vendor call. The test now re-requires with streaming enabled so it does not depend on what ran before it. Verified both ways: skips and exits 0 with no key; 11/11 with a key even under the leaked state. Re-introducing the #155 bug still fails 3 assertions, so the regression value is intact. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>