UNPKG

rescript-test

Version:

> A lightweight test framework for ReScript

43 lines (35 loc) 994 B
// Generated by ReScript, PLEASE EDIT WITH CARE import * as Test from "../src/Test.mjs"; import * as Caml_obj from "rescript/lib/es6/caml_obj.js"; function equal(message, a, b) { Test.assertion(message, "equal", (function (a, b) { return a === b; }), a, b); } function deepEqual(message, a, b) { Test.assertion(message, "deepEqual", Caml_obj.equal, a, b); } Test.testAsync("Async", undefined, (function (cb) { setTimeout((function () { equal(undefined, 1, 2); cb(undefined, undefined); }), 100); })); Test.test("Equals", (function () { equal(undefined, 1, 2); })); Test.test("DeepEquals", (function () { equal(undefined, "user", "user2"); deepEqual(undefined, { username: "user", id: "a" }, { username: "user2", id: "a" }); })); export { equal , deepEqual , } /* Not a pure module */