UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks

31 lines (30 loc) 758 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReportingAPIForTesting = void 0; class ReportingAPIForTesting { constructor(result = { success: true, endpoints: [], configUpdatedAt: 0, heartbeatIntervalInMS: 10 * 60 * 1000, blockedUserIds: [], allowedIPAddresses: [], }) { this.result = result; this.events = []; } setResult(result) { this.result = result; } async report(token, event, timeoutInMS) { this.events.push(event); return this.result; } clear() { this.events = []; } getEvents() { return this.events; } } exports.ReportingAPIForTesting = ReportingAPIForTesting;