8 lines
336 B
JavaScript
8 lines
336 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { liveEventSchema, makeEvent } from "../dist/index.js";
|
|
test("protocol parses typed event", () => {
|
|
const event = makeEvent("1", "live.enter", { viewer: { uid: "42", name: "观众" } });
|
|
assert.equal(liveEventSchema.parse(event).type, "live.enter");
|
|
});
|