I am writing test cases with Jasmin.
When I call bellow method,
initialize({"Data": "primary"});
Which is:
initialize: function(config) {
console.info("initialize Version 2 initialized..");
return new Promise(function(resolve, reject) {
console.info("promise");
resolve(true);
});
}
I am getting below error
ReferenceError: Can't find variable: Promise in http://localhost:8080/absolute/home/krushanu/project/krushanu/ekstep/theLib/js-libs/telemetry/telemetry.js?a043c6a23b1af06737d8e1ae1e1c2e152d4faa83
Installed phantom js Version is 2.1.1
Promise support is not present natively in PhantomJS. See the issue in github here. You could use es6-promise or promise-polyfill to enable Promise support. If it is possible, I would recommend migrating to Puppeteer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With