Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should throw if `acceptEvent` is called with incorrect execution context', async () => {
// Arrange
const { plugin, robotMock, contextMock } = arrange(sinon.stub())
plugin.on('error', sinon.stub())
plugin.load(robotMock)
// Act, Assert
const err = await assert.rejects(plugin.acceptEvent.call(undefined, contextMock))
assert.equal('Unexpected execution context for method call', err.message)
})
})