I’m pleased to announce the release of Alcotest 1.5.0, now available on Opam.
This release includes:
-
JavaScript compatibility (#326), via
js_of_ocaml.3.11.0. Projects that build withjs_of_ocamlcan now use the regularalcotestpackage to test their JavaScript-compatible libraries. For users ofdune, this is as easy as adding(modes ... js)to yourteststanzas (to build the JavaScript targets) and a correspondingruleto run the output:(test (name main) (modes native js) (libraries alcotest)) (rule (alias runtest-js) (action (run node %{dep:main.bc.js})))To depend on a version of
js_of_ocamlthat is supported by Alcotest, add a dependency on the the virtual packagealcotest-js.Many thanks @hhugo and @smorimoto for this excellent contribution!
-
Backtrace collection by default (#317). The Alcotest runner now enables backtrace collection by default, ensuring that failing native tests always come with backtraces without any need to set
OCAMLRUNPARAM=b. -
A stable
Alcotest.V1module (#306). This module is very similar to the existing top-levelAlcotestmodule, but provides some stability guarantee across major versions. It’s intended to provide a migration path for an eventual “Alcotest 2” to make improvements on the existing API.
The full changelog is available here.