Update index.js

add spec failure alert