How to use the assertive.throws function in assertive

To help you get started, we’ve selected a few assertive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jarrodldavis / probot-gpg / test / plugin.js View on Github external
it('should throw if `load` is called with incorrect execution context', () => {
    // Arrange
    const { plugin, robotMock } = arrange(sinon.stub())

    // Act, Assert
    const err = assert.throws(() => plugin.load.call(undefined, robotMock))
    assert.equal('Unexpected execution context for method call', err.message)
  })

assertive

Assertive is a terse yet expressive assertion library

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis