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

+26
View File
@@ -0,0 +1,26 @@
import { describe, it, expect } from 'vitest';
import { createAdapter, isBedrock } from '../../src/adapters/index.js';
const deps = {
rconService: { send: async () => 'r' },
stdinService: { send: async () => 's' },
};
describe('adapter factory', () => {
it('isBedrock detects BEDROCK type case-insensitively', () => {
expect(isBedrock('BEDROCK')).toBe(true);
expect(isBedrock('bedrock')).toBe(true);
expect(isBedrock('PAPER')).toBe(false);
expect(isBedrock(null)).toBe(false);
});
it('creates a java adapter for PAPER', () => {
const a = createAdapter('PAPER', deps);
expect(a.capabilities.has('ban')).toBe(true);
});
it('creates a bedrock adapter for BEDROCK', () => {
const a = createAdapter('BEDROCK', deps);
expect(a.capabilities.has('ban')).toBe(false);
});
});