1.4 KiB
Knowledge One View CLI Tests
This folder keeps the skill tests intentionally small and executable.
The suite covers only two themes:
functions.test.mjschecks local functions and output contracts.sales-prompts.test.mjschecks whether common sales prompts map to quick, documented CLI commands for Oracle DV.
The tests read SKILL.md and references/*.md as the source of truth. They should not keep a parallel copy of long parameter lists, aliases, defaults, or week mappings.
Run offline tests:
node tests/run.mjs
Run live backend checks:
KNOWLEDGE_ONE_VIEW_LIVE=1 \
ORACLE_SI_RUNTIME_HOME=/path/to/workspace/knowledge-one-view-cli/runtime \
node tests/run.mjs
Offline mode does not call Oracle DV. Live mode starts with a no-cache session-context read, then runs prompt-sized backend checks. Prompts that should be org-wide commercial reads assert the primary source from references/api-map.md, reject fallback to DV - SE Team, and use larger live limits when row volume is part of the expected behavior.
Every test invocation of fetch-sales-intelligence.mjs is forced through --no-cache.
When ORACLE_SI_RUNTIME_HOME is set, the tests copy auth-state.json and session-meta.json into a temporary runtime first, so live checks do not rewrite the source runtime. Set ORACLE_SI_TEST_RUNTIME_HOME when you intentionally want to provide a writable test runtime.