Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thespyder/rescript-mocha
Mocha bindings for ReScript
https://github.com/thespyder/rescript-mocha
bucklescript mocha reasonml rescript rescript-bindings
Last synced: about 1 month ago
JSON representation
Mocha bindings for ReScript
- Host: GitHub
- URL: https://github.com/thespyder/rescript-mocha
- Owner: TheSpyder
- License: mit
- Created: 2022-03-28T07:09:45.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-30T14:11:33.000Z (5 months ago)
- Last Synced: 2024-09-18T09:33:36.067Z (about 2 months ago)
- Topics: bucklescript, mocha, reasonml, rescript, rescript-bindings
- Language: ReScript
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# rescript-mocha
ReScript bindings for mocha
## Install
```
npm install rescript-mocha --save-dev
```## Usage
```rescript
open RescriptMocha
let {it:it', it_skip:it_skip'} = module (Promise)
open Mocha
open Beltdescribe("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](LICENSE).
This project was forked from [bs-mocha](https://github.com/reasonml-community/bs-mocha) after it was abandoned.