add index.js tests