fix npm test timing issues