Skip to content

Commit

Permalink
Port isNot
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed May 6, 2024
1 parent 8940171 commit ec4b755
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Zora.res
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type testMessage = string
@send external equal: (t, 't, 't, ~msg: testMessage=?) => unit = "equal"
@send external notEqual: (t, 't, 't, ~msg: testMessage=?) => unit = "notEqual"
@send external is: (t, 't, 't, ~msg: testMessage=?) => unit = "is"
@send external isNot: (t, 't, 't, testMessage) => unit = "isNot"
@send external isNot: (t, 't, 't, ~msg: testMessage=?) => unit = "isNot"
@send external ok: (t, bool, testMessage) => unit = "ok"
@send external notOk: (t, bool, testMessage) => unit = "notOk"
@send external fail: (t, testMessage) => unit = "fail"
Expand Down
4 changes: 4 additions & 0 deletions tests/assertions.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ Zora$1.test("Test assertions", (async function (t) {
var x = {
hello: "world"
};
var z = {
hello: "world"
};
t.is(x, x);
t.isNot(x, z);
}));
}));

Expand Down
7 changes: 3 additions & 4 deletions tests/assertions.test.res
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ zora("Test assertions", async t => {
let z = {"hello": "world"}
t->is(x, x, ~msg="object is object")
t->is(x, y, ~msg="object is object")
t->isNot(x, z, "object is not object with same values")
t->isNot(x, z, ~msg="object is not object with same values")
t->equal(x, z, ~msg="Object is deep equal")
t->ok(true, "boolean is ok")
t->notOk(false, "boolean is not ok")
Expand All @@ -26,10 +26,9 @@ zora("Test assertions", async t => {
t->equal(42, 42)
t->notEqual(42, 43)
let x = {"hello": "world"}
// let z = {"hello": "world"}
let z = {"hello": "world"}
t->is(x, x)
// t->isNot(x, z)
// t->equal(x, z)
t->isNot(x, z)
// t->ok(true)
// t->notOk(false)
// t->optionNone(None)
Expand Down

0 comments on commit ec4b755

Please # to comment.