chore: vault tests refactors and lint (#2374)

This commit is contained in:
Karol Sójko
2023-08-02 00:23:56 +02:00
committed by GitHub
parent a0bc1d2488
commit 247daddf5a
96 changed files with 1463 additions and 751 deletions

View File

@@ -8,16 +8,21 @@ import {
import { PayloadManager } from './PayloadManager'
import { InternalEventBusInterface } from '@standardnotes/services'
import { ContentType } from '@standardnotes/domain-core'
import { LoggerInterface } from '@standardnotes/utils'
describe('payload manager', () => {
let payloadManager: PayloadManager
let internalEventBus: InternalEventBusInterface
let logger: LoggerInterface
beforeEach(() => {
internalEventBus = {} as jest.Mocked<InternalEventBusInterface>
internalEventBus.publish = jest.fn()
payloadManager = new PayloadManager(internalEventBus)
logger = {} as jest.Mocked<LoggerInterface>
logger.debug = jest.fn()
payloadManager = new PayloadManager(logger, internalEventBus)
})
it('emitting a payload should emit as-is and not merge on top of existing payload', async () => {