add tests for tuple key type

This commit is contained in:
2025-01-29 16:56:52 -08:00
parent 661bee0b85
commit 0bd85ce305

View File

@@ -0,0 +1,18 @@
import { describe, expect, it } from "@jest/globals";
import { TupleKey } from "../../src/types/TupleKey";
describe("TupleKey", () => {
it("stores a value copy of the original tuple", () => {
const tuple: [string, string] = ["150", "539"];
const tupleKey = new TupleKey(...tuple);
expect(tupleKey.tuple).toEqual(tuple);
});
it("returns a string representation of itself", () => {
const tuple: [string, string] = ["150", "539"];
const tupleKey = new TupleKey(...tuple);
expect(`${tupleKey}`).toEqual("150|539");
});
});