Skip to content

Commit

Permalink
update readme to use JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Jul 17, 2024
1 parent a2167aa commit 458f0be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion e2e_test.ts
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]'
Expand Down
4 changes: 2 additions & 2 deletions mod_test.ts
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
Expand Down

0 comments on commit 458f0be

Please sign in to comment.