fix get article test

This commit is contained in:
Hongbo Wu
2022-07-14 17:56:55 +08:00
parent 7d2d2ff410
commit edd44fcafc
4 changed files with 7 additions and 1 deletions

View File

@ -167,7 +167,7 @@ export interface Highlight {
suffix?: string | null
annotation?: string | null
sharedAt?: Date | null
updatedAt?: Date
updatedAt: Date
labels?: Label[]
}

View File

@ -236,6 +236,7 @@ describe('elastic api', () => {
id: highlightId,
userId: page.userId,
createdAt: new Date(),
updatedAt: new Date(),
}
await addHighlightToPage(page.id, highlightData, ctx)
@ -288,6 +289,7 @@ describe('elastic api', () => {
id: highlightId,
userId: page.userId,
createdAt: new Date(),
updatedAt: new Date(),
}
await addHighlightToPage(page.id, highlightData, ctx)

View File

@ -460,6 +460,7 @@ describe('Article API', () => {
createdAt: new Date(),
patch: 'test patch',
quote: 'test quote',
updatedAt: new Date(),
},
],
} as Page

View File

@ -271,6 +271,7 @@ describe('Labels API', () => {
userId: user.id,
createdAt: new Date(),
labels: [toDeleteLabel],
updatedAt: new Date(),
}
await addHighlightToPage(page.id, highlight, ctx)
})
@ -527,6 +528,7 @@ describe('Labels API', () => {
quote: 'test quote',
shortId: 'test shortId',
userId: user.id,
updatedAt: new Date(),
}
await addHighlightToPage(page.id, highlight, ctx)
labelIds = [labels[0].id, labels[1].id]
@ -550,6 +552,7 @@ describe('Labels API', () => {
quote: 'test quote',
shortId: 'test shortId',
userId: user.id,
updatedAt: new Date(),
}
await addHighlightToPage(page.id, highlight, ctx)
labelIds = [generateFakeUuid(), generateFakeUuid()]