expect-to-throw

3.0.46 • 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()
        })
    })
})

/expect-to-throw/

    Package Sidebar

    Install

    npm i expect-to-throw

    Weekly Downloads

    13

    Version

    3.0.46

    License

    GPL-3.0-or-later

    Unpacked Size

    49.4 kB

    Total Files

    20

    Last publish

    Collaborators

    • vcalatayud