Files
formipay/node_modules/csp_evaluator/dist/finding_test.js
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

36 lines
1.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("jasmine");
const csp_1 = require("./csp");
const finding_1 = require("./finding");
describe('Test finding', () => {
it('Finding', () => {
const type = finding_1.Type.MISSING_SEMICOLON;
const description = 'description';
const severity = finding_1.Severity.HIGH;
const directive = csp_1.Directive.SCRIPT_SRC;
const value = csp_1.Keyword.NONE;
const finding = new finding_1.Finding(type, description, severity, directive, value);
expect(finding.type).toBe(type);
expect(finding.description).toBe(description);
expect(finding.severity).toBe(severity);
expect(finding.directive).toBe(directive);
expect(finding.value).toBe(value);
});
it('GetHighestSeverity', () => {
const finding1 = new finding_1.Finding(finding_1.Type.MISSING_SEMICOLON, 'description', finding_1.Severity.HIGH, csp_1.Directive.SCRIPT_SRC);
const finding2 = new finding_1.Finding(finding_1.Type.MISSING_SEMICOLON, 'description', finding_1.Severity.MEDIUM, csp_1.Directive.SCRIPT_SRC);
const finding3 = new finding_1.Finding(finding_1.Type.MISSING_SEMICOLON, 'description', finding_1.Severity.INFO, csp_1.Directive.SCRIPT_SRC);
expect(finding_1.Finding.getHighestSeverity([
finding1, finding3, finding2, finding1
])).toBe(finding_1.Severity.HIGH);
expect(finding_1.Finding.getHighestSeverity([
finding3, finding2
])).toBe(finding_1.Severity.MEDIUM);
expect(finding_1.Finding.getHighestSeverity([
finding3, finding3
])).toBe(finding_1.Severity.INFO);
expect(finding_1.Finding.getHighestSeverity([])).toBe(finding_1.Severity.NONE);
});
});
//# sourceMappingURL=finding_test.js.map