Skip to content

Commit

Permalink
fix: backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed May 10, 2024
1 parent 2703aad commit c995eb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,9 @@ describe('CommmunityMetadataStore', () => {
...metaValid,
rootCa: 'Something invalid!',
}
const ret = await communityMetadataStore.setEntry(metaInvalid.id, metaInvalid)
expect(communityMetadataStore.setEntry(metaInvalid.id, metaInvalid)).rejects.toThrow()
const meta = communityMetadataStore.getEntry()

expect(ret).toStrictEqual(undefined)
expect(meta).toEqual(undefined)
expect(meta).toEqual(null)
})
})

Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/nest/storage/storage.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,13 @@ describe('StorageService', () => {
await storageService.init(peerId)
// @ts-ignore
storageService.certificatesRequestsStore = {
getCsrs: jest.fn(() => {
getEntries: jest.fn(() => {
return csrs
}),
}
// @ts-ignore
storageService.certificatesStore = {
getCertificates: jest.fn(() => {
getEntries: jest.fn(() => {
return certs
}),
}
Expand Down

0 comments on commit c995eb8

Please sign in to comment.