feat(turbo-gen): templates for gen realtime channel

This commit is contained in:
2026-05-08 22:56:28 +02:00
parent 4032e5a722
commit a39f372710
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// packages/{{kebabCase feature}}/src/realtime/{{kebabCase channelSlug}}.channel.test.ts
import { describe, it, expect } from "vitest";
import {
{{camelCase channelSlug}}Channel,
{{camelCase channelSlug}}Schema,
} from "@/realtime/{{kebabCase channelSlug}}.channel";
describe("{{camelCase channelSlug}}Channel", () => {
it("has the expected wire name", () => {
expect({{camelCase channelSlug}}Channel.name).toBe(
"{{kebabCase feature}}.{{kebabCase channelSlug}}",
);
});
it("validates an empty payload (stub schema)", () => {
expect(() => {{camelCase channelSlug}}Schema.parse({})).not.toThrow();
});
});