mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
test(docs): align examples-docs assertions with revamped docs
PR #103 (setup/guide doc revamp) reworded several CLI examples and connection labels; the assertions in scripts/examples-docs.test.mjs still referenced the pre-revamp wording and were failing in CI on main. Update the regexes to match the post-revamp content: - drop the `--json` flag from the sl-query example expectation - move the `Driver:` / `Status: ok` probe to the connection reference, which is where that output now lives (driver id is lowercase `postgres`, not the display name `PostgreSQL`) - drop the obsolete `Install \`uv\`...` troubleshooting line - accept `<connectionId>` everywhere; the docs no longer use the hyphenated `<connection-id>` form - match the `warehouse` connection id used in the quickstart instead of the `postgres-warehouse` id only used in the README and setup ref
This commit is contained in:
parent
cd49d5d4ae
commit
7072d3708c
1 changed files with 6 additions and 6 deletions
|
|
@ -168,7 +168,7 @@ describe('standalone example docs', () => {
|
|||
'ktx status --json',
|
||||
'ktx sl list --json',
|
||||
'ktx sl search "revenue" --json',
|
||||
'ktx sl query --json',
|
||||
'ktx sl query',
|
||||
'ktx wiki search "revenue recognition" --json',
|
||||
]) {
|
||||
assert.match(servingAgents, new RegExp(command.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||
|
|
@ -183,7 +183,8 @@ describe('standalone example docs', () => {
|
|||
assert.match(connectionReference, /ktx connection test my-warehouse/);
|
||||
assert.match(connectionReference, /ktx connection test --all/);
|
||||
assert.match(quickstart, /Connection test passed/);
|
||||
assert.match(quickstart, /Driver: PostgreSQL .* Status: ok/);
|
||||
assert.match(connectionReference, /Driver: postgres/);
|
||||
assert.match(connectionReference, /Status: ok/);
|
||||
});
|
||||
|
||||
it('documents public npm and managed runtime usage', async () => {
|
||||
|
|
@ -195,7 +196,6 @@ describe('standalone example docs', () => {
|
|||
assert.match(quickstart, publicPackagePattern('npm install -g {package}'));
|
||||
assert.match(quickstart, /ktx dev runtime install --feature local-embeddings --yes/);
|
||||
assert.match(quickstart, /ktx dev runtime start --feature local-embeddings/);
|
||||
assert.match(quickstart, /Install `uv`, run `ktx dev runtime status`/);
|
||||
assert.match(packageArtifacts, /requires `uv` on `PATH`/);
|
||||
assert.match(packageArtifacts, /ktx dev runtime status/);
|
||||
assert.match(packageArtifacts, /ktx dev runtime status/);
|
||||
|
|
@ -255,15 +255,15 @@ describe('standalone example docs', () => {
|
|||
assert.match(ingestReference, /ktx ingest <connectionId>/);
|
||||
assert.match(ingestReference, /ktx ingest --all --deep/);
|
||||
assert.match(ingestReference, /--query-history-window-days <days>/);
|
||||
assert.match(buildingContext, /ktx ingest <connection-id>/);
|
||||
assert.match(buildingContext, /ktx ingest <connectionId>/);
|
||||
assert.match(buildingContext, /ktx ingest --all/);
|
||||
assert.match(contextSources, /ktx ingest <connectionId>/);
|
||||
assert.match(contextAsCode, /ktx ingest --all --no-input/);
|
||||
assert.match(quickstart, /schema context/);
|
||||
assert.match(primarySources, /context:\n queryHistory:/);
|
||||
assert.match(rootReadme, /Databases configured: yes \(postgres-warehouse\)/);
|
||||
assert.match(quickstart, /Databases:\n postgres-warehouse: deep context complete/);
|
||||
assert.match(quickstart, /Databases configured: yes \(postgres-warehouse\)/);
|
||||
assert.match(quickstart, /Databases:\n warehouse: deep context complete/);
|
||||
assert.match(quickstart, /Databases configured: yes \(warehouse\)/);
|
||||
assert.match(setupReference, /Databases configured: yes \(postgres-warehouse\)/);
|
||||
assert.doesNotMatch(rootReadme, new RegExp(['Primary sources', 'configured'].join(' ')));
|
||||
assert.doesNotMatch(quickstart, new RegExp(['Primary', 'sources'].join(' ')));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue