Update alert.js test to take into account API change