utils.js: Fixed failing test causing a Javascript error