Files
wehub-resource-sync f9447f8e5f
CI / typecheck · build · test · bundle-size (push) Failing after 1s
CI / clean-room dependency closure smoke (push) Failing after 1s
CI / server-runtime e2e (docker · pg + valkey) (push) Failing after 2s
Deploy Install Scripts / deploy (push) Failing after 2s
Windows / build (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:07:03 +08:00

34 lines
949 B
TypeScript

import { describe, it, expect } from 'bun:test';
import { paths, DATA_DIR } from '../../src/shared/paths.js';
describe('paths namespace', () => {
it('exposes at least the known core accessors', () => {
const keys = Object.keys(paths);
const required = [
'dataDir',
'workerPid',
'settings',
'database',
'chroma',
'transcriptsConfig',
];
for (const key of required) {
expect(keys).toContain(key);
}
});
it('every accessor returns a string starting with DATA_DIR', () => {
for (const key of Object.keys(paths) as Array<keyof typeof paths>) {
const value = paths[key]();
expect(typeof value).toBe('string');
expect(value.startsWith(DATA_DIR)).toBe(true);
}
});
it('every accessor is a callable function', () => {
for (const key of Object.keys(paths) as Array<keyof typeof paths>) {
expect(typeof paths[key]).toBe('function');
}
});
});