Add timeout

This commit is contained in:
Hongbo Wu 2022-09-30 13:10:58 +08:00
parent 8942398092
commit 25740465f2
2 changed files with 11 additions and 3 deletions

View file

@ -10,7 +10,11 @@ import { expect } from 'chai'
import 'mocha'
import { User } from '../../src/entity/user'
import chaiString from 'chai-string'
import { UpdateReason, UploadFileStatus } from '../../src/generated/graphql'
import {
SyncUpdatedItemEdge,
UpdateReason,
UploadFileStatus,
} from '../../src/generated/graphql'
import {
ArticleSavingRequestStatus,
Highlight,
@ -1033,7 +1037,11 @@ describe('Article API', () => {
authToken
).expect(200)
expect(res.body.data.updatesSince.edges.length).to.eql(3)
expect(
res.body.data.updatesSince.edges.filter(
(e: SyncUpdatedItemEdge) => e.updateReason === UpdateReason.Deleted
).length
).to.eql(3)
expect(res.body.data.updatesSince.edges[0].itemID).to.eq(
deletedPages[0].id
)

View file

@ -156,7 +156,7 @@ describe('Newsletter email test', () => {
expect(url).to.startWith(
'https://newsletter.slowchinese.net/p/companies-that-eat-people-217'
)
})
}).timeout(10000)
it('gets the URL from the header if it is a beehiiv newsletter', async () => {
nock('https://u23463625.ct.sendgrid.net')
.head(