mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Base: Add man page for test-js(1)
This commit is contained in:
parent
02018af0cc
commit
4c845b35ac
Notes:
sideshowbarker
2024-07-19 05:03:17 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/4c845b35ac7 Pull-request: https://github.com/SerenityOS/serenity/pull/2720 Reviewed-by: https://github.com/bugaevc ✅
2 changed files with 41 additions and 0 deletions
|
@ -46,3 +46,7 @@ undefined
|
|||
77
|
||||
undefined
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [`test-js`(1)](test-js.md)
|
||||
|
|
37
Base/usr/share/man/man1/test-js.md
Normal file
37
Base/usr/share/man/man1/test-js.md
Normal file
|
@ -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)
|
Loading…
Reference in a new issue