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_ocaml
can now use the regularalcotest
package to test their JavaScript-compatible libraries. For users ofdune
, this is as easy as adding(modes ... js)
to yourtest
stanzas (to build the JavaScript targets) and a correspondingrule
to 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_ocaml
that 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.V1
module (#306). This module is very similar to the existing top-levelAlcotest
module, 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.