Changed tests to use the chai syntax for exception checking