rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
18 lines (15 loc) • 489 B
text/typescript
import { mapValuesToArray } from "./map-values-to-array.js";
import { Test_setDefaultFlags } from "../../test-util/test_set-default-flags.js";
describe("=> mapValuesToArray", () =>
{
beforeEach(() =>
{
Test_setDefaultFlags();
});
const values = new Map([["a", 1], ["b", 2], ["c", 3]] as const);
it("| returns the map's values", () =>
{
const result: (1 | 2 | 3)[] = mapValuesToArray(values);
expect(result).toEqual([1, 2, 3]);
});
});