UNPKG

@tevari/helpers

Version:

Collection of various small helpers for javascript and typescript based projects

21 lines (17 loc) 510 B
import { Functions } from "../functions"; /* * Helpers */ describe("#Functions.helper.identity", () => { it("should return the exact given value", () => { expect(Functions.helper.identity()("test")).toEqual("test"); expect(Functions.helper.identity()(42)).toEqual(42); }); }); describe("#Functions.helper.attribute", () => { it("should return the given value as the given type", () => { expect(Functions.helper.attribute("name")({ name: "test" })).toEqual( "test" ); }); });