Skip to content

Commit cab9df7

Browse files
committed
Update CONTRIBUTING.md
1 parent 98e5814 commit cab9df7

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,23 @@ Below we will discuss on how to write, build and run these test files.
227227
- Inside the file, add a mocha test suite. The mocha bindings are defined in `tests/tests/src/mt.res`. To get you started, here is a simple scaffold for a test suite with multiple test cases:
228228

229229
```rescript
230-
let suites: Mt.pair_suites = list{
231-
("hey", _ => Eq(true, 3 > 2)),
232-
("hi", _ => Neq(2, 3)),
233-
("hello", _ => Approx(3.0, 3.0)),
234-
("throw", _ => ThrowAny(_ => raise(SomeException))),
235-
}
236-
237-
Mt.from_pair_suites(__MODULE__, suites)
230+
open Mocha
231+
open Test_utils
232+
233+
describe(__MODULE__, () => {
234+
test("hey", () => {
235+
ok(__LOC__, 3 > 2)
236+
})
237+
238+
test("hi", () => {
239+
eq(__LOC__, 2, 2)
240+
eq(__LOC__, 3, 3)
241+
})
242+
243+
test("throw", () => {
244+
throws(__LOC__, () => throw(SomeException))
245+
})
246+
})
238247
```
239248

240249
- Build the test files and run the tests: `node scripts/test.js -mocha`.

0 commit comments

Comments
 (0)