feat: add website enrichment crawler
This commit is contained in:
27
tests/runs-domain.test.ts
Normal file
27
tests/runs-domain.test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
const runsSource = readFileSync(
|
||||
join(process.cwd(), "convex", "runs.ts"),
|
||||
"utf8",
|
||||
);
|
||||
const schemaSource = readFileSync(
|
||||
join(process.cwd(), "convex", "schema.ts"),
|
||||
"utf8",
|
||||
);
|
||||
|
||||
test("run listing supports type-only filtering", () => {
|
||||
assert.match(
|
||||
runsSource,
|
||||
/if\s*\(\s*args\.type\s*\)\s*\{[\s\S]*?\.withIndex\(\s*"by_type"\s*,\s*\(q\)\s*=>\s*q\.eq\("type",\s*type\)\)/,
|
||||
);
|
||||
});
|
||||
|
||||
test("agentRuns schema defines by_type index", () => {
|
||||
assert.match(
|
||||
schemaSource,
|
||||
/\.index\("by_type",\s*\["type"\]\)/,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user