-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
a2167aa
commit 458f0be
Showing
3 changed files
with
9 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,12 @@ HTTP Server testing library inspired by | |
### Basic testing | ||
|
||
```ts | ||
import { describe, it, run } from 'https://deno.land/x/tincan/mod.ts' | ||
import { makeFetch } from 'https://x.nest.land/[email protected]/mod.ts' | ||
import type { Handler } from 'https://deno.land/[email protected]/http/server.ts' | ||
import { describe, it } from 'jsr:@std/testing/bdd' | ||
import { makeFetch } from 'jsr:@deno-libs/superfetch' | ||
|
||
describe('makeFetch', () => { | ||
it('should work with HTTP handler', async () => { | ||
const handler: Handler = (res) => new Response('Hello World') | ||
const handler = (res) => new Response('Hello World') | ||
|
||
const fetch = makeFetch(s) | ||
|
||
|
@@ -32,13 +31,12 @@ run() | |
### Full access to Response and port | ||
```ts | ||
import { describe, it, run } from 'https://deno.land/x/tincan/mod.ts' | ||
import { makeFetch } from 'https://x.nest.land/[email protected]/mod.ts' | ||
import type { Handler } from 'https://deno.land/[email protected]/http/server.ts' | ||
import { describe, it } from 'jsr:@std/testing/bdd' | ||
import { makeFetch } from 'jsr:@deno-libs/superfetch' | ||
|
||
describe('makeFetch', () => { | ||
it('should work with HTTP handler', async () => { | ||
const handler: Handler = (res) => new Response('Hello World') | ||
const handler = (res) => new Response('Hello World') | ||
|
||
const fetch = makeFetch(s) | ||
|
||
|
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,4 +1,4 @@ | ||
import { describe, it } from 'https://deno.land/std@0.224.0/testing/bdd.ts' | ||
import { describe, it } from 'jsr:@std/testing@0.225.3/bdd' | ||
import { makeFetch } from './mod.ts' | ||
import { GraphQLHTTP } from 'https://deno.land/x/[email protected]/mod.ts' | ||
import { buildSchema } from 'npm:[email protected]' | ||
|
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,7 +1,7 @@ | ||
import { describe, it } from 'https://deno.land/std@0.224.0/testing/bdd.ts' | ||
import { describe, it } from 'jsr:@std/testing@0.225.3/bdd' | ||
import { expect } from 'jsr:@std/[email protected]/expect' | ||
import { makeFetch } from './mod.ts' | ||
import { Handler } from './types.ts' | ||
import type { Handler } from './types.ts' | ||
import { AssertionError } from 'jsr:@std/[email protected]/assertion-error' | ||
|
||
// this simulates the listener | ||
|