Files
community-rule/tests/unit/templateGridFacetScores.test.ts
T
adilallo 6498d52541 Skip setup questions on the template path and collect name, photo, and description without recommendations.
Customize opens a dialog then walks the template decks; Use without changes lands on final review with Has Name Field. Template cards stay first, the engine is not called, and the catalog no longer shows a recommended tag.
2026-11-09 17:34:33 -07:00

22 lines
636 B
TypeScript

import { describe, it, expect } from "vitest";
import { ruleTemplateToGridEntry } from "../../lib/templates/templateGridPresentation";
import type { RuleTemplateDto } from "../../lib/create/fetchTemplates";
const minimalTemplate = (slug: string, title: string): RuleTemplateDto => ({
id: "x",
slug,
title,
category: null,
description: null,
body: null,
sortOrder: 0,
featured: false,
});
describe("ruleTemplateToGridEntry", () => {
it("never marks a template recommended", () => {
const row = ruleTemplateToGridEntry(minimalTemplate("do-ocracy", "Do-ocracy"));
expect(row.recommended).toBe(false);
});
});