Update tests.js

Fixing the unit tests