diff --git a/src/Zora.res b/src/Zora.res index 13ab34e..66634b2 100644 --- a/src/Zora.res +++ b/src/Zora.res @@ -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" diff --git a/tests/assertions.test.mjs b/tests/assertions.test.mjs index b33944b..08eb609 100644 --- a/tests/assertions.test.mjs +++ b/tests/assertions.test.mjs @@ -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); })); })); diff --git a/tests/assertions.test.res b/tests/assertions.test.res index 032b6c6..61385a6 100644 --- a/tests/assertions.test.res +++ b/tests/assertions.test.res @@ -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") @@ -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)