On an Angular project, we use Karma, Karma-Phantom-launcher which itself uses phantom-js prebuilt, v2.1.14.
As soon as we launch our tests, PhantomJS fails to load:
PhantomJS ERROR
TypeError: FileConstructor is not a constructor (evaluating 'new File(arrayOfBlob, "Mock.zip")')
at webpack:///src/app/file.component.spec.ts:83:4 <- src/test.ts:44676
Is PhantomJS supporting new File() ?
Here is our full code:
let content = "Hello Mock";
let data = new Blob([content], { type: 'application/zip' });
let arrayOfBlob = new Array<Blob>();
arrayOfBlob.push(data);
let file = new File(arrayOfBlob, "Mock.zip");
On an Angular project, we use Karma, Karma-Phantom-launcher which itself uses phantom-js prebuilt, v2.1.14.
As soon as we launch our tests, PhantomJS fails to load:
Is PhantomJS supporting
new File()
?Here is our full code: