import * as crypto from "crypto"; import { Response } from "node-fetch"; import RecSys from "../src"; import Configuration from "../src/loader/default.config"; RecSys.init(Configuration); (global as any).document.domain = ""; (global as any).Response = Response; (global as any).crypto = { getRandomValues(arr: any[]) { const buf = crypto.randomBytes(arr.length); buf.forEach((val, idx) => (arr[idx] = val)); return arr; }, };