chore: fix ContentType usage (#2353)

* chore: fix ContentType usage

* chore: fix specs
This commit is contained in:
Karol Sójko
2023-07-12 13:53:29 +02:00
committed by GitHub
parent d057cdff84
commit 325737bfbd
247 changed files with 1092 additions and 1060 deletions

View File

@@ -10,7 +10,7 @@ describe('payload manager', () => {
this.createNotePayload = async () => {
return new DecryptedPayload({
uuid: Factory.generateUuidish(),
content_type: ContentType.Note,
content_type: ContentType.TYPES.Note,
content: {
title: 'hello',
text: 'world',
@@ -45,7 +45,7 @@ describe('payload manager', () => {
it('insertion observer', async function () {
const observations = []
this.payloadManager.addObserver(ContentType.Any, ({ inserted }) => {
this.payloadManager.addObserver(ContentType.TYPES.Any, ({ inserted }) => {
observations.push({ inserted })
})
const payload = await this.createNotePayload()
@@ -57,7 +57,7 @@ describe('payload manager', () => {
it('change observer', async function () {
const observations = []
this.payloadManager.addObserver(ContentType.Any, ({ changed }) => {
this.payloadManager.addObserver(ContentType.TYPES.Any, ({ changed }) => {
if (changed.length > 0) {
observations.push({ changed })
}
@@ -78,7 +78,7 @@ describe('payload manager', () => {
})
it('reset state', async function () {
this.payloadManager.addObserver(ContentType.Any, ({}) => {})
this.payloadManager.addObserver(ContentType.TYPES.Any, ({}) => {})
const payload = await this.createNotePayload()
await this.payloadManager.emitPayload(payload)
await this.payloadManager.resetState()