Files
project-inter-server/test/types/TupleKeyTests.test.ts

18 lines
554 B
TypeScript

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");
});
});