From 0cbe31e22f0acb0f80214befb9f016f052c96a0a Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Thu, 26 Sep 2024 17:30:00 +0100 Subject: [PATCH] chore: fix type --- .../__tests__/MutableIngestPartImpl.spec.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/job-worker/src/blueprints/ingest/__tests__/MutableIngestPartImpl.spec.ts b/packages/job-worker/src/blueprints/ingest/__tests__/MutableIngestPartImpl.spec.ts index f03bf70040..03fe89d6ac 100644 --- a/packages/job-worker/src/blueprints/ingest/__tests__/MutableIngestPartImpl.spec.ts +++ b/packages/job-worker/src/blueprints/ingest/__tests__/MutableIngestPartImpl.spec.ts @@ -1,6 +1,7 @@ import { IngestPart } from '@sofie-automation/blueprints-integration' import { MutableIngestPartImpl } from '../MutableIngestPartImpl' import { clone } from '@sofie-automation/corelib/dist/lib' +import { toSofieIngestPart } from './util' describe('MutableIngestPartImpl', () => { function getBasicIngestPart(): IngestPart { @@ -17,7 +18,7 @@ describe('MutableIngestPartImpl', () => { test('create basic', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.externalId).toBe(ingestPart.externalId) @@ -30,7 +31,7 @@ describe('MutableIngestPartImpl', () => { test('create basic with changes', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart), true) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart)), true) // compare properties expect(mutablePart.externalId).toBe(ingestPart.externalId) @@ -46,7 +47,7 @@ describe('MutableIngestPartImpl', () => { test('set name', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.name).toBe(ingestPart.name) @@ -61,7 +62,7 @@ describe('MutableIngestPartImpl', () => { test('replace payload with change', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.payload).toEqual(ingestPart.payload) @@ -77,7 +78,7 @@ describe('MutableIngestPartImpl', () => { test('replace payload with no change', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.payload).toEqual(ingestPart.payload) @@ -92,7 +93,7 @@ describe('MutableIngestPartImpl', () => { test('set payload property change', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.payload).toEqual(ingestPart.payload) @@ -109,7 +110,7 @@ describe('MutableIngestPartImpl', () => { test('set payload property unchanged', () => { const ingestPart = getBasicIngestPart() - const mutablePart = new MutableIngestPartImpl(clone(ingestPart)) + const mutablePart = new MutableIngestPartImpl(toSofieIngestPart(clone(ingestPart))) // compare properties expect(mutablePart.payload).toEqual(ingestPart.payload)