Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
// @vitest-environment node
import { describe, it, expect, vi } from 'vitest';
import { readdirSync, readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
import * as barrel from './index.js';
// Enumeration never renders a GLTF; keep Drei's render-only dependency out of this harness.
vi.mock('@react-three/drei', () => ({ useAnimations: vi.fn(), useGLTF: vi.fn() }));
const HERE = dirname(fileURLToPath(import.meta.url));
const BARREL_SRC = readFileSync(join(HERE, 'index.js'), 'utf8');
const README_SRC = readFileSync(join(HERE, 'README.md'), 'utf8');
const sourceFiles = readdirSync(HERE).filter(
(f) => (f.endsWith('.js') || f.endsWith('.jsx'))
&& !f.endsWith('.test.js') && !f.endsWith('.test.jsx')
&& f !== 'index.js',
);
describe('client/src/hooks/ barrel', () => {
it('re-exports every non-test hook file from index.js', () => {
expect(Object.keys(barrel).length).toBeGreaterThan(0);
for (const f of sourceFiles) {
expect(BARREL_SRC, `missing barrel re-export for ${f}`).toContain(`'./${f}'`);
}
});
it('every non-test hook file has a README row', () => {
for (const f of sourceFiles) {
const base = f.replace(/\.(js|jsx)$/, '');
expect(README_SRC, `missing README entry for ${f}`).toContain(base);
}
});
});