Open mooreryan opened 1 year ago
I also tried to set up the dune file as in the blog post on testing (https://github.com/janestreet/bonsai/blob/master/docs/blogs/testing.mdx):
(library (
(name my_ui_test)
(js_of_ocaml ()) ; Test library must be marked with js_of_ocaml
(libraries (core my_ui))
(inline_tests ( ; Native tests must be disabled
(native dont_build_dont_run)
(javascript build_and_run)))))
But that gave other dune errors, so I'm assuming that isn't part of the solution.
Here is a "minimum" example that triggers the error when running dune runtest
:
dune file
(library
(name hi)
(inline_tests
(modes js))
(libraries bonsai.web_test)
(preprocess
(pps ppx_inline_test)))
OCaml file
let%test _ = 1 = 2
So, I guess my question now is, is the npm install deasync
the "correct" thing to do? (Well, it works so I will use it for now.)
Ah, yes that is the right package, but I'm a bit surprised that deasync is required if you aren't using our bonsai-test + async integration. I'll look into this
I think I must be doing something obviously wrong here...but I can't get the inline tests to work with v0.16.0.
dune file
Error when running tests
Switching back to the v0.15.1 release of bonsai, the above works fine.