mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add tests for tuple key type
This commit is contained in:
18
test/types/TupleKeyTests.test.ts
Normal file
18
test/types/TupleKeyTests.test.ts
Normal 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");
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user