fix(db): transactional useMagicToken, O(2) getSession, ?? for displayName

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-30 01:00:20 +00:00
parent d8de79ce7d
commit b229e6871f
2 changed files with 8 additions and 11 deletions
+2 -6
View File
@@ -43,14 +43,10 @@ describe('profiles', () => {
test('updateProfileSeen updates last_seen timestamp', () => {
const created = db.createProfile('seen@example.com', 'Seen')
const before = created.last_seen
// Ensure time advances by at least 1ms
const laterTime = before + 1
// Use a small delay approach: manipulate via direct SQL isn't needed,
// just call updateProfileSeen and verify last_seen >= original
const callTime = Date.now()
db.updateProfileSeen(created.id)
const updated = db.findProfileById(created.id)
assert.ok(updated.last_seen >= before)
assert.ok(updated.last_seen >= callTime)
})
})