1
0
Fork 0
functional/objects.test.ts

9 lines
228 B
TypeScript

import { expect, it } from "./deps.test.ts";
import { attr } from "./objects.ts";
it("attr", () => {
const getx = attr("x");
expect(getx({ x: 4, y: 5 })).toBe(4);
expect(getx({ x: undefined, y: 5 })).toBeUndefined();
});