base.spec.ts 432 B

123456789101112131415
  1. import {evaluate, sampleFunction} from "../src";
  2. describe("This is a simple test", () => {
  3. test("Check the sampleFunction function", () => {
  4. const actual = sampleFunction("hello");
  5. const expected = "hellohello";
  6. expect(actual).toEqual(expected);
  7. });
  8. });
  9. describe("Simple expression tests", () => {
  10. test("Check literal value", () => {
  11. expect(evaluate({ type: "literal", value: 5 })).toBeCloseTo(5);
  12. });
  13. });