test(backend): refactor tests (#13499)
* test(backend): refactor tests * fix: failed test
This commit is contained in:
@@ -51,7 +51,7 @@ describe('AnnouncementService', () => {
|
||||
|
||||
function createAnnouncement(data: Partial<MiAnnouncement & { createdAt: Date }> = {}) {
|
||||
return announcementsRepository.insert({
|
||||
id: genAidx(data.createdAt ?? new Date()),
|
||||
id: genAidx(data.createdAt?.getTime() ?? Date.now()),
|
||||
updatedAt: null,
|
||||
title: 'Title',
|
||||
text: 'Text',
|
||||
|
Reference in New Issue
Block a user