Viniciustda/OiTenta / .agents/skills/config-package-shared
config-package-shared
VerifiedReconstrói o pacote compartilhado base da aplicação, concentrando contratos reutilizáveis, classes base, erros de domínio, casos de uso e validações consumidas pelo backend, frontend e módulos de negócio.
assets/shared-template/test/validation/rules/format-rules.test.ts
View on GitHubimport {
HexColorRule,
JsonStringRule,
SlugRule,
UuidRule,
} from "../../../src/index";
describe("Format rules", () => {
test("UuidRule deve aceitar apenas UUID v4", () => {
const rule = new UuidRule();
expect(rule.validate("550e8400-e29b-41d4-a716-446655440000")).toBeNull();
expect(rule.validate("6ba7b810-9dad-11d1-80b4-00c04fd430c8")).toBe("uuid");
});
test("SlugRule deve aceitar apenas slugs validos", () => {
const rule = new SlugRule();
expect(rule.validate("meu-texto-aqui")).toBeNull();
expect(rule.validate("MeuTextoAqui")).toBe("slug");
});
test("HexColorRule deve validar cores hexadecimais", () => {
const rule = new HexColorRule();
expect(rule.validate("#FFF")).toBeNull();
expect(rule.validate("#ffffff")).toBeNull();
expect(rule.validate("FFF")).toBe("hex.color");
});
test("JsonStringRule deve validar JSON parseavel", () => {
const rule = new JsonStringRule();
expect(rule.validate('{"name":"john"}')).toBeNull();
expect(rule.validate("[]")).toBeNull();
expect(rule.validate("{")).toBe("json.string");
expect(rule.validate("")).toBeNull();
});
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |