I\'m trying to write a test for the Jasmine Test Framework which expects an error. At the moment I\'m using a Jasmine Node.js integration from GitHub.
In my Node mod
In my case the function throwing error was async so I followed here:
await expectAsync(asyncFunction()).toBeRejected(); await expectAsync(asyncFunction()).toBeRejectedWithError(...);