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: validate milestone completion timestamp (#7017)

[._.]/ Adam Eivyd8ec145a8f53
diff --git a/server/services/identity.test.js b/server/services/identity.test.js
index 0ce5277555..f3194b6ab3 100644
--- a/server/services/identity.test.js
+++ b/server/services/identity.test.js
@@ -1005,7 +1005,9 @@ describe('Integration: Goal CRUD', () => {
const milestone = await addMilestone(goal.id, { title: 'Complete me' });
const completed = await completeMilestone(goal.id, milestone.id);
- expect(completed.completedAt).toBeDefined();
+ expect(completed.completedAt).not.toBeNull();
+ expect(typeof completed.completedAt).toBe('string');
+ expect(Number.isNaN(Date.parse(completed.completedAt))).toBe(false);
});
it('should return null for completing non-existent milestone', async () => {