You’re not testing that the test’s error equals the expected thrown error, you are testing if it equals the error passed to the callback.