Switched to using chai as promised for the tests. Updated the tests to work with the new error throwing