1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-27 16:10:57 -05:00

runTests added to docs (#164)

This commit is contained in:
Rob Muhlestein 2019-01-29 15:10:40 -05:00 committed by Ryan Dahl
parent bef7ba1430
commit 5119cd3c59

View file

@ -37,10 +37,17 @@ functions:
`assertEqual()` is the same as `assert.equal()` but maintained for backwards `assertEqual()` is the same as `assert.equal()` but maintained for backwards
compatibility. compatibility.
`runTests()` executes the declared tests.
Basic usage: Basic usage:
```ts ```ts
import { test, assert, equal } from "https://deno.land/x/testing/mod.ts"; import {
runTests,
test,
assert,
equal
} from "https://deno.land/x/testing/mod.ts";
test({ test({
name: "testing example", name: "testing example",
@ -53,6 +60,8 @@ test({
assert.equal({ hello: "world" }, { hello: "world" }); assert.equal({ hello: "world" }, { hello: "world" });
} }
}); });
runTests();
``` ```
Short syntax (named function instead of object): Short syntax (named function instead of object):