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.
- Loading branch information
Showing
8 changed files
with
42 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "deno run", | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "deno", | ||
"runtimeArgs": ["run", "--inspect-brk", "${file}"], | ||
"attachSimplePort": 9229 | ||
}, | ||
{ | ||
"name": "deno test", | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "deno", | ||
"runtimeArgs": ["test", "--inspect-brk", "${file}"], | ||
"attachSimplePort": 9229 | ||
} | ||
] | ||
} |
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,9 +1,9 @@ | ||
# Test Suite | ||
|
||
[![version](https://img.shields.io/badge/release-v0.1.0-success)](https://github.com/udibo/test_suite/tree/v0.1.0) | ||
[![version](https://img.shields.io/badge/release-v0.2.0-success)](https://github.com/udibo/test_suite/tree/v0.2.0) | ||
[![deno doc](https://img.shields.io/badge/deno-doc-success?logo=deno)](https://doc.deno.land/https/deno.land/x/[email protected]/mod.ts) | ||
[![deno version](https://img.shields.io/badge/deno-v1.3.2-success?logo=deno)](https://github.com/denoland/deno/tree/v1.3.2) | ||
[![CI](https://github.com/udibo/mock/workflows/CI/badge.svg)](https://github.com/udibo/test_suite/actions?query=workflow%3ACI) | ||
[![deno version](https://img.shields.io/badge/deno-v1.3.1-success)](https://github.com/denoland/deno/tree/v1.3.1) | ||
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected]/mod.ts) | ||
[![license](https://img.shields.io/github/license/udibo/test_suite)](https://github.com/udibo/test_suite/blob/master/LICENSE) | ||
|
||
This module extends Deno's built-in test runner to add setup/teardown hooks | ||
|
@@ -23,16 +23,16 @@ but can also be imported directly from GitHub using raw content URLs. | |
|
||
```ts | ||
// Import from Deno's third party module registry | ||
import { TestSuite, test } from "https://deno.land/x/test_suite@v0.1.0/mod.ts"; | ||
import { TestSuite, test } from "https://deno.land/x/test_suite@v0.2.0/mod.ts"; | ||
// Import from GitHub | ||
import { TestSuite, } "https://raw.githubusercontent.com/udibo/test_suite/v0.1.0/mod.ts"; | ||
import { TestSuite, } "https://raw.githubusercontent.com/udibo/test_suite/v0.2.0/mod.ts"; | ||
``` | ||
## Usage | ||
Below are some examples of how to use TestSuite and test in tests. | ||
See [deno docs](https://doc.deno.land/https/deno.land/x/test_suite@v0.1.0/mod.ts) for more information. | ||
See [deno docs](https://doc.deno.land/https/deno.land/x/test_suite@v0.2.0/mod.ts) for more information. | ||
### TestSuite | ||
|
@@ -47,8 +47,8 @@ The beforeEach and afterEach hook options are similar to beforeAll and afterAll | |
The example test below can be found in the example directory. | ||
```ts | ||
import { TestSuite, test } from "https://deno.land/x/test_suite@v0.1.0/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.66.0/testing/asserts.ts"; | ||
import { TestSuite, test } from "https://deno.land/x/test_suite@v0.2.0/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std@0.67.0/testing/asserts.ts"; | ||
import { User, getUser, resetUsers } from "./example/user.ts"; | ||
|
||
interface UserSuiteContext { | ||
|
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 +1 @@ | ||
export { delay } from "https://deno.land/std@0.66.0/async/delay.ts"; | ||
export { delay } from "https://deno.land/std@0.67.0/async/delay.ts"; |
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,3 +1,3 @@ | ||
export { | ||
assertEquals, | ||
} from "https://deno.land/std@0.66.0/testing/asserts.ts"; | ||
} from "https://deno.land/std@0.67.0/testing/asserts.ts"; |
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
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