Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/thatdeveloperguy-website / tests/unit/verify-riv.test.ts |
| Date | Not specified in source |
| Repository | Janady13/thatdeveloperguy-website |
| Revision | 2bea2ebdff0e34494bff597d4fa9c8422a0c3a94 |
| Branch | main |
| Path or archive member | tests/unit/verify-riv.test.ts |
| Original SHA-256 | f0364037dfb0625923e567ce5823c59d0225ab91c795f87f3cc05ab3fcd87401 |
| Git blob SHA | 29c34b2e3913f79106e6b1cd0825fb98dc25c7b6 |
| Reading-copy SHA-256 | f0364037dfb0625923e567ce5823c59d0225ab91c795f87f3cc05ab3fcd87401 |
Recovered source transcript
Download complete source text ↓19 lines · 1.5 KB
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { existsSync, readFileSync } from 'node:fs';
import { verifyRiv } from '../../tools/verify-riv.ts';
const manifestUrl = new URL('../../creative-source/rive/lobby/rive-manifest.json', import.meta.url);
const exportedBy = existsSync(manifestUrl) ? JSON.parse(readFileSync(manifestUrl, 'utf8')).exportedBy : null;
const stagedLobby = JSON.parse(readFileSync(new URL('../../app/experience/scenes/lobby/scene.json', import.meta.url), 'utf8'));
const stagedRive = Boolean(stagedLobby.rive);
// The editor MCP's own export omits MCP-created artboards; only a UI export can pass. `npm run rive:verify` reports the raw state.
test('the exported lobby.riv matches its rive-manifest', { skip: !stagedRive ? 'production lobby uses static base plus transparent environment layers; no full-scene Rive is staged' : !['editor-ui', 'rive-cli'].includes(exportedBy) ? `lobby.riv exportedBy=${exportedBy}; needs an editor-UI or CLI export` : false }, async () => {
const result = await verifyRiv('lobby');
assert.equal(result.artboard, 'Lobby');
for (const name of ['Sway A', 'Clouds', 'Lights On', 'Door It Hover', 'Door Gov Hover', 'Door Cyber Hover']) assert.ok(result.animations.includes(name), `missing animation ${name}`);
assert.equal(result.stateMachines.length, 1);
for (const name of ['hoverIt', 'hoverGov', 'hoverCyber', 'openIt', 'openGov', 'openCyber', 'doorIt', 'doorGov', 'doorCyber', 'walk']) assert.ok(result.viewModelProperties.includes(name), `missing view-model property ${name}`);
});