Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import "jest-preset-angular";
// stupid workaround for TS
import * as helper from "algoliasearch-helper";
require("algoliasearch-helper").default = helper;
const mock = () => {
let storage = {};
return {
getItem(key) {
return storage[key] || null;
},
setItem(key, value) {
storage[key] = value;
},
removeItem(key) {
delete storage[key];
},
clear() {
storage = {};
}