How to mock Blob and Click() in jasmine Specs in angular js
How to write Jasmine specs for Blob and Click() event. Every time I am running Specs its downloading file. Can I mock this (and browser also). Thanks var csvFile = "a,b,c",filename="abc.csv"; var blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' }); if (navigator.msSaveBlob) { // IE 10+ navigator.msSaveBlob(blob, filename); } else { var link = document.createElement("a"); if (link.download !== undefined) { // feature detection // Browsers that support HTML5 download attribute var url = URL.createObjectURL(blob); link.setAttribute("href", url); link.setAttribute("download", filename)