blob: cbf5577bb291060cd8da5c284f6dbcb5d855ed43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
## Name
test-js - run the LibJS test suite
## Synopsis
```**sh
$ test-js [options...]
```
## Description
`test-js` runs the LibJS test suite located in `/home/anon/js-tests`. These
tests are using a custom JavaScript testing framework inspired by
[Jest](https://jestjs.io) (see [`test-common.js`](/home/anon/js-tests/test-common.js)).
## Options
* `-t`, `--show-time`: Show duration of each test
## Examples
A very simple test looks like this:
```js
describe("Examples from Gary Bernhardt's 'Wat' talk", () => {
test("Na na na na na na na na na na na na na na na na Batman!", () => {
expect(Array(16).join("wat" - 1) + " Batman!").toBe(
"NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman!"
);
});
});
```
## See also
* [`js`(1)](js.md)
|