Spaces:
Sleeping
Sleeping
Download dashboard/tests/microcopy.test.js from JuanCS-Dev/twitch-byte-bot: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/JuanCS-Dev/twitch-byte-bot/resolve/main/dashboard/tests/microcopy.test.js
- Command line
-
hf download hf://spaces/JuanCS-Dev/twitch-byte-bot/dashboard/tests/microcopy.test.js
-
curl -L -o microcopy.test.js https://huggingface.co/spaces/JuanCS-Dev/twitch-byte-bot/resolve/main/dashboard/tests/microcopy.test.js
1.15 kB
| // O1.5 — Byte's honest microcopy line (deterministic, charm with honesty). | |
| import test from "node:test"; | |
| import assert from "node:assert/strict"; | |
| import { byteLine } from "../features/mascot/microcopy.js"; | |
| test("Prove that the line is honest about no/low signal", () => { | |
| assert.match(byteLine({ ok: false }), /sinal suficiente/i); | |
| assert.match(byteLine({ sentiment: { count: 0 } }), /prontid/i); | |
| }); | |
| test("Prove that operational state drives the line deterministically", () => { | |
| assert.match(byteLine({ control_plane: { autonomy: { suspended: true } } }), /pausado/i); | |
| assert.match(byteLine({ queue: { items: [{}] } }), /aprova/i); | |
| assert.match(byteLine({ sentiment: { count: 9, avg: 0.5 } }), /hype/i); | |
| assert.match(byteLine({ sentiment: { count: 9, avg: -0.4 } }), /esfriou/i); | |
| assert.match(byteLine({ sentiment: { count: 9, avg: 0 } }), /lendo o chat/i); | |
| }); | |
| test("Prove that the same input yields the same line and never throws", () => { | |
| const snap = { sentiment: { count: 3, avg: 0.4 } }; | |
| assert.equal(byteLine(snap), byteLine(snap)); | |
| assert.equal(typeof byteLine(), "string"); | |
| assert.ok(byteLine().length > 0); | |
| }); | |