This repository has been archived by the owner on Apr 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate in favor of std/testing/bdd.ts
- Loading branch information
Showing
4 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
# Test Suite | ||
|
||
[![version](https://img.shields.io/badge/release-0.16.0-success)](https://deno.land/x/[email protected].0) | ||
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected].0/mod.ts) | ||
[![version](https://img.shields.io/badge/release-0.16.1-success)](https://deno.land/x/[email protected].1) | ||
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected].1/mod.ts) | ||
[![CI](https://github.com/udibo/test_suite/workflows/CI/badge.svg)](https://github.com/udibo/test_suite/actions?query=workflow%3ACI) | ||
[![codecov](https://codecov.io/gh/udibo/test_suite/branch/main/graph/badge.svg?token=EFKGY72AAV)](https://codecov.io/gh/udibo/test_suite) | ||
[![license](https://img.shields.io/github/license/udibo/test_suite)](https://github.com/udibo/test_suite/blob/master/LICENSE) | ||
|
||
An extension of Deno's built-in test runner to add setup/teardown hooks and make | ||
it easier to organize tests in a format similar to Jasmine, Jest, and Mocha. | ||
|
||
This module is being archived. It has been added to Deno's standard library in | ||
the testing directory. Use Deno's standard library instead. | ||
|
||
## Features | ||
|
||
- Ability to group tests together into test suites | ||
|
@@ -26,12 +29,12 @@ also be imported directly from GitHub using raw content URLs. | |
|
||
```ts | ||
// Import from Deno's third party module registry | ||
import { describe, it } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { describe, it } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
// Import from GitHub | ||
import { | ||
describe, | ||
it, | ||
} from "https://raw.githubusercontent.com/udibo/test_suite/0.16.0/mod.ts"; | ||
} from "https://raw.githubusercontent.com/udibo/test_suite/0.16.1/mod.ts"; | ||
``` | ||
|
||
## Usage | ||
|
@@ -54,7 +57,7 @@ except they are called before and after each individual test. | |
Below are some examples of how to use `describe` and `it` in tests. | ||
|
||
See | ||
[deno docs](https://doc.deno.land/https/deno.land/x/[email protected].0/mod.ts) | ||
[deno docs](https://doc.deno.land/https/deno.land/x/[email protected].1/mod.ts) | ||
for more information. | ||
|
||
### Nested test grouping | ||
|
@@ -67,13 +70,13 @@ import { | |
beforeEach, | ||
describe, | ||
it, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.133.0/testing/asserts.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.135.0/testing/asserts.ts"; | ||
import { | ||
getUser, | ||
resetUsers, | ||
User, | ||
} from "https://deno.land/x/[email protected].0/examples/user.ts"; | ||
} from "https://deno.land/x/[email protected].1/examples/user.ts"; | ||
|
||
describe("user describe", () => { | ||
let user: User; | ||
|
@@ -131,13 +134,13 @@ test result: ok. 1 passed (5 steps); 0 failed; 0 ignored; 0 measured; 0 filtered | |
The example below can be found [here](examples/user_flat_test.ts). | ||
|
||
```ts | ||
import { describe, it } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.133.0/testing/asserts.ts"; | ||
import { describe, it } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.135.0/testing/asserts.ts"; | ||
import { | ||
getUser, | ||
resetUsers, | ||
User, | ||
} from "https://deno.land/x/[email protected].0/examples/user.ts"; | ||
} from "https://deno.land/x/[email protected].1/examples/user.ts"; | ||
|
||
interface UserContext { | ||
user: User; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters