Files
craftdock/test/adapters/playerFileIndex.test.js
Lucas RayanandClaude Sonnet 5.5 640e52c0c9 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>
2026-11-01 22:44:39 -03:00

19 lines
696 B
JavaScript

import { describe, it, expect } from 'vitest';
import { createPlayerFileAdapter } from '../../src/adapters/playerFile/index.js';
const config = { mcDataPath: '/data', mcWorldName: 'worlds' };
describe('createPlayerFileAdapter', () => {
it('returns the bedrock adapter (with findByUniqueId) for bedrock', () => {
const a = createPlayerFileAdapter('bedrock', config);
expect(typeof a.readPlayer).toBe('function');
expect(typeof a.findByUniqueId).toBe('function');
});
it('returns the java adapter for java', () => {
const a = createPlayerFileAdapter('java', config);
expect(typeof a.readPlayer).toBe('function');
expect(a.findByUniqueId).toBeUndefined();
});
});