I have a working function that builds a new Blob() in my app
_buildBlobForProperties(app): Blob {
return new Blob(
[
JSON.stringify({
name: app.name,
description: app.description,
}),
],
{
type: 'application/json',
}
);
}
And I have the following test:
it('should return properties for update',() => {
const blob: Blob = appService._buildBlobForProperties(app);
expect(blob.text()).toBe(updateBlob.text());
});
This test works fine in Jasmin/Karma but when migrating the test to jest I get:
TypeError: blob.text is not a function
And when I print the content of the return Blob I get
console.log
---> Blob {}
Any suggestions?