Files
anthonyrawlins aacb45156b Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library
- Install Playwright for end-to-end testing
- Configure Jest with proper TypeScript support and module mapping
- Create test setup files and utilities for both unit and e2e tests

Components:
* Jest configuration with coverage thresholds
* Playwright configuration with browser automation
* Unit tests for LoginForm, AuthContext, and useSocketIO hook
* E2E tests for authentication, dashboard, and agents workflows
* GitHub Actions workflow for automated testing
* Mock data and API utilities for consistent testing
* Test documentation with best practices

Testing features:
- Unit tests with 70% coverage threshold
- E2E tests with API mocking and user journey testing
- CI/CD integration for automated test runs
- Cross-browser testing support with Playwright
- Authentication system testing end-to-end

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 14:06:34 +10:00

38 lines
1.7 KiB
JavaScript

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify"));
var context_1 = require("./context");
var level_1 = require("./level");
var LogFormatters = defaultLogFormatters();
exports.LogFormatters = LogFormatters;
var resetLogFormatters = function () {
exports.LogFormatters = LogFormatters = defaultLogFormatters();
};
exports.resetLogFormatters = resetLogFormatters;
var registerLogFormatter = function (name, format) {
LogFormatters[name] = format;
};
exports.registerLogFormatter = registerLogFormatter;
function defaultLogFormatters() {
return {
json: function (msg) { return fast_json_stable_stringify_1.default(__assign({}, msg, { time: new Date(msg.time) }), { cycles: true }); },
simple: function (msg) {
return (msg.context[context_1.LogContexts.package] || msg.context[context_1.LogContexts.application] || 'main') + "[" + (msg.context[context_1.LogContexts.namespace] || 'root') + "] (" + level_1.logLevelNameFor(msg.context[context_1.LogContexts.logLevel]).toUpperCase() + ") " + msg.message;
},
};
}