When I run this Jasmine spec through grunt-contrib-jasmine, I get the error TypeError: Attempted to assign to readonly property. pointing to the line where I set the selectedIndex attribute:
it('does something', function () {
setFixtures('<select id="selectId"><option>Text</option></select>');
var selectDOM = document.getElementById('selectId');
selectDOM.selectedIndex = 0;
// stripped some code here...
});
Does anybody know what I am missing here? I use phantomjs v1.9.8, grunt-cli v0.1.13 and grunt-contrib-jasmine v0.9.2.