I have written a UI unit test case in Karma framework which fails in phantomJS but passes in chrome.
Karma version is 0.3.22 which installed phantomJS-1.9.8. So, my test case uses PhantomJS as the default browser. The test case calls the implementation and fails somewhere here:
var model = this.customList.find(function (model) {
return model.getSide() === "sideA"; });
So, here customList has a number of models/objects in it, in that we are only returning the model/object where the side is "sideA".
The error, I get here is:
TypeError: 'undefined' is not a function (evaluating 'this.customList.find(function (model) {
return model.getSide() === "sideA"; })')
But the same test case passes when the browser is selected as chrome in the Intellij configuration "Browsers to start".
I have written a UI unit test case in Karma framework which fails in phantomJS but passes in chrome. Karma version is 0.3.22 which installed phantomJS-1.9.8. So, my test case uses PhantomJS as the default browser. The test case calls the implementation and fails somewhere here: var model = this.customList.find(function (model) { return model.getSide() === "sideA"; }); So, here customList has a number of models/objects in it, in that we are only returning the model/object where the side is "sideA".
The error, I get here is: TypeError: 'undefined' is not a function (evaluating 'this.customList.find(function (model) { return model.getSide() === "sideA"; })')
But the same test case passes when the browser is selected as chrome in the Intellij configuration "Browsers to start".