Add test index and fix npm test command.