Скилл переносится из ~/.claude/skills/aura-design в репозиторий обвязки: SKILL.md, справочники reference/ и набор kit/ (токены, base.css, компоненты React, оболочка AppShell, тест токенов, test-setup, примеры входа). install.sh ставит его в ~/.claude/skills/aura-design, --check его видит. tests/test-aura-design.sh проверяет структуру и инварианты набора. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
770 B
TypeScript
16 lines
770 B
TypeScript
// подключить в vite.config: test: { environment: "jsdom", setupFiles: ["./src/test-setup.ts"] }
|
||
import "@testing-library/jest-dom/vitest";
|
||
import { cleanup } from "@testing-library/react";
|
||
import { afterEach } from "vitest";
|
||
|
||
// jsdom не умеет showModal/close у <dialog> (Dialog, Confirm): открытость — атрибут open, как в браузере
|
||
if (typeof HTMLDialogElement !== "undefined" && !HTMLDialogElement.prototype.showModal) {
|
||
HTMLDialogElement.prototype.showModal = function showModal(this: HTMLDialogElement) { this.setAttribute("open", ""); };
|
||
HTMLDialogElement.prototype.close = function close(this: HTMLDialogElement) { this.removeAttribute("open"); };
|
||
}
|
||
|
||
afterEach(() => {
|
||
cleanup();
|
||
localStorage.clear();
|
||
});
|