0.1.2
๐ HTTP Server testing library inspired by node-supertest-fetch.
Repository
Current version released
3 years ago
Dependencies
std
superfetch
Superdeno-like superagent testing library based on Fetch API. Ported from node-supertest-fetch.
Example
import { describe, it, run } from 'https://deno.land/x/tincan@1.0.0/mod.ts'
import { http } from 'https://deno.land/std@0.106.0/node/http.ts'
import { makeFetch } from '../mod.ts'
describe('makeFetch', () => {
it('should work with std/http', async () => {
const s = http.createServer((req, res) => res.end('Hello World'))
const fetch = makeFetch(s)
await fetch('/').expect('Hello World')
})
run()