chore: fix ContentType usage (#2353)
* chore: fix ContentType usage * chore: fix specs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user