Skip to content

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

test: address review — mirror prod mount path + isolate videoTimeline mock (#2535)

Adam Eivyb8480d1cc629
diff --git a/server/routes/moodBoard.test.js b/server/routes/moodBoard.test.js
index ee8387d14a..362d4980ee 100644
--- a/server/routes/moodBoard.test.js
+++ b/server/routes/moodBoard.test.js
@@ -25,7 +25,7 @@ import moodBoardRoutes from './moodBoard.js';
const makeApp = () => {
const app = express();
app.use(express.json());
- app.use('/api/mood-board', moodBoardRoutes);
+ app.use('/api/mood-boards', moodBoardRoutes);
app.use(errorMiddleware);
return app;
};
@@ -36,7 +36,7 @@ describe('mood-board routes', () => {
describe('GET /', () => {
it('returns the full boards array by default', async () => {
svc.listBoards.mockResolvedValueOnce([{ id: 'mb-1', name: 'A' }]);
- const res = await request(makeApp()).get('/api/mood-board');
+ const res = await request(makeApp()).get('/api/mood-boards');
expect(res.status).toBe(200);
expect(Array.isArray(res.body)).toBe(true);
expect(res.body).toHaveLength(1);
@@ -46,7 +46,7 @@ describe('mood-board routes', () => {
svc.listBoards.mockResolvedValueOnce(
Array.from({ length: 5 }, (_, i) => ({ id: `mb-${i}`, name: `B${i}` }))
);
- const res = await request(makeApp()).get('/api/mood-board?limit=2&offset=1');
+ const res = await request(makeApp()).get('/api/mood-boards?limit=2&offset=1');
expect(res.status).toBe(200);
expect(res.body.items).toHaveLength(2);
expect(res.body.items[0].id).toBe('mb-1');
@@ -59,13 +59,13 @@ describe('mood-board routes', () => {
describe('GET /:id', () => {
it('returns 404 when the board is missing', async () => {
svc.getBoard.mockResolvedValueOnce(null);
- const res = await request(makeApp()).get('/api/mood-board/nope');
+ const res = await request(makeApp()).get('/api/mood-boards/nope');
expect(res.status).toBe(404);
});
it('returns the board when found', async () => {
svc.getBoard.mockResolvedValueOnce({ id: 'mb-1', name: 'A' });
- const res = await request(makeApp()).get('/api/mood-board/mb-1');
+ const res = await request(makeApp()).get('/api/mood-boards/mb-1');
expect(res.status).toBe(200);
expect(res.body.id).toBe('mb-1');
});
diff --git a/server/routes/videoTimeline.test.js b/server/routes/videoTimeline.test.js
index c729a9e698..57b7fbf649 100644
--- a/server/routes/videoTimeline.test.js
+++ b/server/routes/videoTimeline.test.js
@@ -36,7 +36,7 @@ describe('videoTimeline routes', () => {
});
it('returns a bounded envelope when pagination is requested', async () => {
- svc.listProjects.mockResolvedValue(
+ svc.listProjects.mockResolvedValueOnce(
Array.from({ length: 5 }, (_, i) => ({ id: `p${i}`, name: `P${i}` }))
);
const r = await request(app).get('/api/video-timeline/projects?limit=2&offset=1');