rescript-mocha

0.9.0 • Public • Published

rescript-mocha

ReScript bindings for mocha

Install

npm install rescript-mocha --save-dev 

Usage

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
      )
    )
  })
)

License and Credits

All code is licensed as MIT. See LICENSE.

This project was forked from bs-mocha after it was abandoned.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.9.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.9.0
    3

Package Sidebar

Install

npm i rescript-mocha

Weekly Downloads

3

Version

0.9.0

License

MIT

Unpacked Size

64.8 kB

Total Files

25

Last publish

Collaborators

  • thespyder