ReScript bindings for mocha
npm install rescript-mocha --save-dev
open RescriptMocha
let {it:it', it_skip:it_skip'} = module (Promise)
open Mocha
open Belt
describe("Some Test Suite", () =>
describe("List.map", () => {
it("should map the values", () =>
Assert.deep_equal(Array.map([1, 2, 3], (i) => i * 2), [2, 4, 6])
)
it("should work with an empty list", () =>
Assert.deep_equal(Array.map([], (i) => i * 2), [])
)
it'("should be successful", () =>
Js.Promise.make((~resolve, ~reject as _) =>
Js.Global.setTimeout(() => {
Assert.equal(3, 3)
resolve(. true)
}, 300)
->ignore
)
)
})
)
All code is licensed as MIT. See LICENSE.
This project was forked from bs-mocha after it was abandoned.