blackajiro_Resonance/tests/sessionSchema.test.ts
Michael Gorini c4970de099 polish
2026-04-29 17:35:08 +02:00

9 lines
492 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { SUPPORTED_SESSION_SCHEMA_VERSION, isSupportedSessionManifest } from "../src/domain/session";
test("isSupportedSessionManifest accepts only the current schema version", () => {
assert.equal(isSupportedSessionManifest({ schemaVersion: SUPPORTED_SESSION_SCHEMA_VERSION }), true);
assert.equal(isSupportedSessionManifest({ schemaVersion: 3 }), false);
assert.equal(isSupportedSessionManifest({}), false);
});