Trying to test a binding of lit-html
method html
open Jest;
let write = () => LitHtml.html("<div></div>");
open Expect;
describe("LitHtml", () =>
test("#html", () =>
expect(() =>
write()
) |> not_ |> toThrow
)
);
I am told this cryptic error:
Error: Unbound value not__
Hint: Did you mean not_?
Jest.Expect.plainPartial('a) => Jest.Expect.invertedPartial('a)
But clearly wrote not_
as it suggests, not not__
.
My attempted binding:
[@bs.module "LitHtml"] [@bs.val]
external html: string => Js.nullable(string) = "html";
let html = htmlStr => html(htmlStr) |> Js.Nullable.toOption;
Thanks for any assistance. Just getting started with ReasonML ;)