Update protocol version

* Added types.test.ts
  - "should have correct latest protocol version"
  - "should have correct supported protocol versions"
This commit is contained in:
cliffhall 2025-04-25 09:28:16 -04:00
commit 1e9d5d548a

17
src/types.test.ts Normal file
View file

@ -0,0 +1,17 @@
import { LATEST_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS} from "./types.js";
describe("Types", () => {
test("should have correct latest protocol version", () => {
expect(LATEST_PROTOCOL_VERSION).toBeDefined();
expect(LATEST_PROTOCOL_VERSION).toBe("2025-03-26");
});
test("should have correct supported protocol versions", () => {
expect(SUPPORTED_PROTOCOL_VERSIONS).toBeDefined();
expect(SUPPORTED_PROTOCOL_VERSIONS).toBeInstanceOf(Array);
expect(SUPPORTED_PROTOCOL_VERSIONS).toContain(LATEST_PROTOCOL_VERSION);
expect(SUPPORTED_PROTOCOL_VERSIONS).toContain("2024-11-05");
expect(SUPPORTED_PROTOCOL_VERSIONS).toContain("2024-10-07");
});
});