3.0.0 • Published 4 months ago

prismy-test v3.0.0

Weekly downloads
22
License
MIT
Repository
github
Last release
4 months ago

prismy-test

:wrench: Test toolkit for prismy.

Build Status codecov NPM download Language grade: JavaScript

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

3.0.0

4 months ago

3.0.0-0

3 years ago

2.0.0

4 years ago

1.0.0

5 years ago