Revert "Revert test changes"

This reverts commit c586bbd70b176e2ae5950dfe9d27fefce56c22d2.
Upgrade mocha