mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-11-13 17:08:20 +00:00
chore: update lint rules
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { TOOLS } from "../registry";
|
||||
import { setLocale } from "./locale.svelte";
|
||||
import { searchTools, verdictText } from "./schema-tool-strings";
|
||||
import {
|
||||
searchTools,
|
||||
toolDescription,
|
||||
toolTitle,
|
||||
verdictText,
|
||||
} from "./schema-tool-strings";
|
||||
|
||||
afterEach(() => {
|
||||
setLocale("ru");
|
||||
@@ -45,6 +50,18 @@ describe("searchTools (кросс-языковой поиск каталога)"
|
||||
});
|
||||
});
|
||||
|
||||
describe("metadata fallback", () => {
|
||||
it("uses registry title and description in the base locale", () => {
|
||||
setLocale("en");
|
||||
for (const tool of TOOLS) {
|
||||
expect(toolTitle(tool), `${tool.id}: title`).toBe(tool.title);
|
||||
expect(toolDescription(tool), `${tool.id}: description`).toBe(
|
||||
tool.description,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("verdictText (вердикт с vars)", () => {
|
||||
it("интерполирует {vars} в обоих локалях", () => {
|
||||
setLocale("ru");
|
||||
|
||||
Reference in New Issue
Block a user