Rely
Rely
Fast, native, Jest-style test framework
Learn More
describe("Example", ({test}) => {
test("ints", ({expect}) =>
expect.int(7).toBe(5)
);
test("bools", ({expect}) =>
expect.bool(true).not.toBe(false)
);
});
Running 1 test suite
[31m[1m[7m FAIL [27m[22m[39m [97mExample[39m
[1m[31m • Example › ints[39m[22m
[2mexpect.int([22m[31mreceived[39m[2m).toBe([22m[32mexpected[39m[2m)[22m
Expected: [32m3[39m
Received: [31m2[39m
[2m 3 ┆ [22m
[2m 4 ┆ [22m[2mdescribe([22m[32m[2m"Example"[22m[39m[2m, ({test})[22m[31m[2m => [22m[39m[2m{[22m
[2m 5 ┆ [22m[2m test([22m[32m[2m"ints"[22m[39m[2m, ({expect})[22m[31m[2m => [22m[39m[2m{[22m
[31m[2m 6 ┆ [22m[39m[2m [22m[31m[1m[4mexpect.int(1 + 1).toBe(3)[24m[22m[39m[2m;[22m
[2m 7 ┆ [22m[2m ();[22m
[2m 8 ┆ [22m[2m });[22m
[2m 9 ┆ [22m[2m test([22m[32m[2m"bools"[22m[39m[2m, ({expect})[22m[31m[2m => [22m[39m[2m{[22m
[2mRaised by primitive operation at [22m[36m./tests/ExampleTest.re:6:4[39m
[2mCalled from [22m[36m./map.ml:291:20[39m
[2mCalled from [22m[36m./common/CommonCollections.re:171:8[39m
[97m[1mTest Suites: [22m[39m[31m[1m1 failed[22m[39m, 0 passed, 1 total
[97m[1mTests: [22m[39m[31m[1m1 failed[22m[39m, [32m[1m1 passed[22m[39m, 2 total
[97m[1mTime: [22m[39m0.002s
Console
Console
A web-influenced polymorphic console API for native Console.log(anything) with runtime printing.
Learn More
Console.log(4.6);
Console.log("This is a string");
Console.log(a => a + 1);
4.6
This is a string
closure(2182546092)
Pastel
Pastel
Terminal highlighting with support for nesting and style propagation.
Learn More
<Pastel bold=true color=Pastel.Yellow>
"This will be formatted as bold, yellow text"
</Pastel>
[33m[1mThis will be formatted as bold, yellow text[22m[39m
Refmterr
Refmterr
Utility for extracting structure from unstructured ocaml compiler errors, and displaying them.
Learn More
refmterr dune build -p my-project
[1m[2m# Unformatted Error Output:[22m[22m
[2m# [22m[2mFile "myFile.ml", line 2, characters 13-21:[22m
[2m# [22m[2mError: Unbound type constructor whereAmI[22m
[31m[1m[7m ERROR [27m[22m[39m [36m[4mmyFile.ml[24m[39m[2m[4m:2 13-21[24m[22m
[2m1 ┆ [22m[35m[2mtype[22m[39m[2m asd =[22m
[31m[2m2 ┆ [22m[39m[2m | [22m[34m[2mHello[22m[39m[2m of [22m[31m[1m[4mwhereAmI[24m[22m[39m
[2m3 ┆ [22m[2m | [22m[34m[2mGoodbye[22m[39m
The type [31m[1mwhereAmI[22m[39m can't be found.
File Context Printer
File Context Printer
Utility for displaying snippets of files on the command line.
Learn More
FCP.printFile(
"src/file-context-printer/test/DummyFile.re",
((7, 1), (7, 11)),
);
[2m 4 ┆ [22m[2m * [22m[34m[2mThis[22m[39m[2m source code is licensed under the ...
[2m 5 ┆ [22m[2m * [22m[34m[2mLICENSE[22m[39m[2m file in the root directory of ...
[2m 6 ┆ [22m[2m */;[22m
[31m[2m 7 ┆ [22m[39m[31m[1m[4mlet myFunc[24m[22m[39m[2mtion = ()[22m[31m[2m => [22m[39m[2mprint_endline([22m[32m[2m"do something"[22m[39m[2m);[22m
[2m 8 ┆ [22m
[2m 9 ┆ [22m[35m[2mlet[22m[39m[2m ex = (arg)[22m[31m[2m => [22m[39m[2m{[22m
[2m10 ┆ [22m[2m [22m[33m[2mif[22m[39m[2m(arg === true) {[22m