prismy-test
v3.0.0
Published
:wrench: Test toolkit for prismy
Downloads
7
Readme
prismy-test
:wrench: Test toolkit for prismy.
import got from 'got'
import { prismy, res } from 'prismy'
import { testHandler } from 'prismy-test'
describe('testServer', () => {
it('tests server', async () => {
const handler = prismy([], () => {
return res('Hello, World!')
})
await testHandler(handler, async url => {
const result = await got(url)
expect(result).toMatchObject({
body: 'Hello, World!'
})
})
})
})
License
MIT