Initial commit: CraftDock as of 2026-11-01

The previous GitHub history was lost with the account (the local .git was missing
its refs and most objects), so this repository starts from the existing code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-11-01 22:44:39 -03:00
commit 640e52c0c9
99 files changed
+12115

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { describe, it, expect, vi } from 'vitest';
import { registerSockets } from '../../src/sockets/index.js';
describe('registerSockets', () => {
it('creates /logs and /status namespaces with auth middleware', () => {
const namespaces = {};
const io = {
of: vi.fn((name) => {
const ns = { use: vi.fn(), on: vi.fn() };
namespaces[name] = ns;
return ns;
}),
};
registerSockets(io, {
dockerService: {}, appState: {}, sessionMiddleware: (req, res, next) => next(),
});
expect(io.of).toHaveBeenCalledWith('/logs');
expect(io.of).toHaveBeenCalledWith('/status');
expect(namespaces['/logs'].use).toHaveBeenCalled();
expect(namespaces['/status'].use).toHaveBeenCalled();
});
});