I had the same problem, I found the solution on Github. h=HereBasically, you need to delete indexOf() function after error.message so it should look like this
assert(error.message, 'error message must contain revert');
Here is your answer: https://github.com/dappuniversity/token_sale/issues/27