prismy-test

3.0.0 • Public • Published

prismy-test

🔧 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

Readme

Keywords

Package Sidebar

Install

npm i prismy-test

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

3.94 kB

Total Files

5

Last publish

Collaborators

  • rokt33r
  • rohjs