-
Testing errors in async functions with Chai
Testing errors in async code which uses promises with Chai can be a bit of a hassle, but it becomes very easy with a plugin called chai-as-promised. See the example below.
Testing errors in async code which uses promises with Chai can be a bit of a hassle, but it becomes very easy with a plugin called chai-as-promised. See the example below.