Either pass the function:
chai.expect(manager.test).to.throw('Oh no');
Or use an anonymous function:
chai.expect(() => manager.test()).to.throw('Oh no');
See the documentation on the throw
method to learn more.
Either pass the function:
chai.expect(manager.test).to.throw('Oh no');
Or use an anonymous function:
chai.expect(() => manager.test()).to.throw('Oh no');
See the documentation on the throw
method to learn more.