sdlc-hub/web/src/board/dicts.test.ts
2026-10-14 21:49:17 +04:00

16 lines
729 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { describe, expect, it } from "vitest";
import golden from "./__fixtures__/hub-basic.expected.json";
import settings from "./__fixtures__/settings.json";
import { dictsFromSettings } from "./dicts.ts";
describe("dictsFromSettings", () => {
it("обращает словари настроек и совпадает со словарями старой страницы", () => {
const { dicts, missing } = dictsFromSettings(settings);
expect(dicts).toEqual(golden.dicts);
expect(missing).toEqual([]);
});
it("называет пустые и отсутствующие словари", () => {
expect(dictsFromSettings({ kind_labels: {} }).missing).toEqual(["kind_labels", "link_types"]);
});
});