pragmatic-fp-ts
Version:
Opinionated functional programming library with easy use in mind
12 lines (10 loc) • 345 B
text/typescript
import { keys } from "../keys.ts";
describe("keys()", () => {
it("should get keys from an object", () => {
expect(keys({ foo: 1, bar: 2 })).toEqual(["foo", "bar"]);
});
it("should get keys from a map", () => {
const m = new Map<string, number>().set("foo", 1).set("bar", 2);
expect(keys(m)).toEqual(["foo", "bar"]);
});
});