Miss any of our Open RFC calls?Watch the recordings here! »

expect-to-throw

3.0.2 • Public • Published

Build Status

expect-to-throw

Just a method to expect an async method to throw

const expectToThrow = require('expect-to-throw')

describe('some method', function(){
    it('must throw', async function(){
        await expectToThrow(async function(){
            await someMethod()
        })
    })
})

Install

npm i expect-to-throw

DownloadsWeekly Downloads

12

Version

3.0.2

License

GPL-3.0-or-later

Unpacked Size

48.3 kB

Total Files

18

Last publish

Collaborators

  • avatar