mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: pipeline templates, analytics opt-out, 83 conversion presets, positioning + e2e modernization
Lands five integrated branches: pipeline templates (#355), analytics opt-out (#354), 83 conversion presets bringing the catalog to 240 tools (#356), self-hosted positioning (#353), and e2e modernization (#351). Integration fixes: aligned stale web analytics tests with the opt-out/allow-list model, closed 3 CodeQL incomplete-sanitization alerts in the i18n generator, resolved settings/index/docs/format-matrix conflicts, and corrected tool counts to 240.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { matchTool } from "../../../apps/landing/src/lib/tool-search.js";
|
||||
|
||||
// haystack = name + " " + desc + " " + keywords (all lowercase, space-joined)
|
||||
const jpgPng = {
|
||||
id: "jpg-to-png",
|
||||
haystack: "jpg to png convert jpg to png jpg jpeg png jpg2png jpgtopng",
|
||||
};
|
||||
|
||||
describe("landing matchTool", () => {
|
||||
it.each([
|
||||
"jpeg to png",
|
||||
"jpg2png",
|
||||
"jpg to png",
|
||||
"covert jpg to png", // misspelling of convert
|
||||
])("matches %s", (q) => {
|
||||
expect(matchTool(q, jpgPng.haystack)).toBe(true);
|
||||
});
|
||||
|
||||
it("typo within one edit still matches via fallback (jpge)", () => {
|
||||
expect(matchTool("jpge to png", jpgPng.haystack)).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects unrelated query", () => {
|
||||
expect(matchTool("trim video", jpgPng.haystack)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user