mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
const request = require('supertest');
|
|
const app = require('../src/server');
|
|
|
|
describe('Server Tests', () => {
|
|
describe('GET /health', () => {
|
|
it('should return health status', async () => {
|
|
const response = await request(app)
|
|
.get('/health')
|
|
.expect(200);
|
|
|
|
expect(response.body).toHaveProperty('status', 'healthy');
|
|
expect(response.body).toHaveProperty('timestamp');
|
|
expect(response.body).toHaveProperty('uptime');
|
|
expect(response.body).toHaveProperty('environment');
|
|
});
|
|
});
|
|
|
|
describe('GET /api/v1', () => {
|
|
it('should return API information', async () => {
|
|
const response = await request(app)
|
|
.get('/api/v1')
|
|
.expect(200);
|
|
|
|
expect(response.body).toHaveProperty('message', 'REST API Example');
|
|
expect(response.body).toHaveProperty('version', '1.0.0');
|
|
expect(response.body).toHaveProperty('endpoints');
|
|
expect(response.body.endpoints).toHaveProperty('users');
|
|
expect(response.body.endpoints).toHaveProperty('products');
|
|
});
|
|
});
|
|
|
|
describe('404 Handler', () => {
|
|
it('should return 404 for unknown routes', async () => {
|
|
const response = await request(app)
|
|
.get('/unknown-route')
|
|
.expect(404);
|
|
|
|
expect(response.body).toHaveProperty('error', 'Not Found');
|
|
expect(response.body).toHaveProperty('message');
|
|
});
|
|
});
|
|
}); |