Typo in index.js

Changed tests suite to catch errors in index.js