Skip to content

Commit

Permalink
chore: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Sep 26, 2024
1 parent c1a332d commit 0cbe31e
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -92,7 +93,7 @@ describe('MutableIngestPartImpl', () => {

test('set payload property change', () => {
const ingestPart = getBasicIngestPart()
const mutablePart = new MutableIngestPartImpl<any>(clone(ingestPart))
const mutablePart = new MutableIngestPartImpl<any>(toSofieIngestPart(clone(ingestPart)))

// compare properties
expect(mutablePart.payload).toEqual(ingestPart.payload)
Expand All @@ -109,7 +110,7 @@ describe('MutableIngestPartImpl', () => {

test('set payload property unchanged', () => {
const ingestPart = getBasicIngestPart()
const mutablePart = new MutableIngestPartImpl<any>(clone(ingestPart))
const mutablePart = new MutableIngestPartImpl<any>(toSofieIngestPart(clone(ingestPart)))

// compare properties
expect(mutablePart.payload).toEqual(ingestPart.payload)
Expand Down

0 comments on commit 0cbe31e

Please sign in to comment.