mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
4ff3e7632b
🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
29 lines
772 B
TypeScript
29 lines
772 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
|
|
describe('@claude-flow/hooks', () => {
|
|
it('should export hook types', () => {
|
|
// Placeholder test - hooks module exports types and utilities
|
|
expect(true).toBe(true);
|
|
});
|
|
|
|
it('should support hook registration', () => {
|
|
// Hooks can be registered for pre/post events
|
|
const hooks = new Map<string, Function[]>();
|
|
hooks.set('pre-edit', [() => {}]);
|
|
expect(hooks.has('pre-edit')).toBe(true);
|
|
});
|
|
|
|
it('should support hook execution', async () => {
|
|
// Hooks execute in order
|
|
const results: number[] = [];
|
|
const hooks = [
|
|
() => results.push(1),
|
|
() => results.push(2),
|
|
];
|
|
for (const hook of hooks) {
|
|
hook();
|
|
}
|
|
expect(results).toEqual([1, 2]);
|
|
});
|
|
});
|