diff --git a/Base/usr/share/man/man1/js.md b/Base/usr/share/man/man1/js.md index 68332f7454..234806da86 100644 --- a/Base/usr/share/man/man1/js.md +++ b/Base/usr/share/man/man1/js.md @@ -46,3 +46,7 @@ undefined 77 undefined ``` + +## See also + +* [`test-js`(1)](test-js.md) diff --git a/Base/usr/share/man/man1/test-js.md b/Base/usr/share/man/man1/test-js.md new file mode 100644 index 0000000000..2f1f8b4a74 --- /dev/null +++ b/Base/usr/share/man/man1/test-js.md @@ -0,0 +1,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` in the same directory). + +## 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)