public
anord
read
Ledger
Why work hard when you can work easier?
Languages
Repository composition by tracked source files.
TypeScript
86%
CSS
10%
SQL
3%
Shell
1%
HTML
0%
Trace
apps/api/src/test/search.test.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
import { describe, expect, it } from "vitest";
2
import { matchesSearchQuery } from "../services/search.js";
4
describe("search matching", () => {
5
it("matches content in page title", () => {
6
expect(matchesSearchQuery("ledger", "Ledger setup", "body")).toBe(true);
7
});
9
it("matches content in markdown body", () => {
10
expect(matchesSearchQuery("incident", "Runbook", "Major incident workflow")).toBe(true);
11
});
13
it("does not match blank queries", () => {
14
expect(matchesSearchQuery(" ", "Runbook", "body")).toBe(false);
15
});
16
});