Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/resolvers/__tests__/downstreamKeyer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const fullDiff: Required<DiffDownstreamKeyer> = {
}

test('Unit: Downstream keyer: same state gives no commands', function () {
const commands = resolveDownstreamKeyerState(DSK1, DSK1, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK1, fullDiff)
expect(commands).toHaveLength(0)
})

Expand All @@ -38,7 +38,7 @@ test('Unit: Downstream keyer: auto and onAir commands', function () {
isAuto: true,
}

const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(2)

const firstCommand = commands[0] as Commands.DownstreamKeyOnAirCommand
Expand All @@ -63,7 +63,7 @@ test('Unit: Downstream keyer: sources', function () {
DSK2[0].sources.fillSource = 1
DSK2[1].sources.cutSource = 2

const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(2)

const firstCommand = commands[0] as Commands.DownstreamKeyFillSourceCommand
Expand All @@ -86,7 +86,7 @@ test('Unit: Downstream keyer: sources', function () {

test('Unit: Downstream keyer: rate', function () {
DSK2[0].properties.rate = 50
const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(1)

const firstCommand = commands[0] as Commands.DownstreamKeyRateCommand
Expand All @@ -100,7 +100,7 @@ test('Unit: Downstream keyer: rate', function () {

test('Unit: Downstream keyer: tie', function () {
DSK2[0].properties.tie = true
const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(1)

const firstCommand = commands[0] as Commands.DownstreamKeyTieCommand
Expand All @@ -117,7 +117,7 @@ test('Unit: Downstream keyer: properties', function () {
DSK2[0].properties.clip = 500
DSK2[0].properties.gain = 50
DSK2[0].properties.invert = true
const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(1)

const firstCommand = commands[0] as Commands.DownstreamKeyGeneralCommand
Expand All @@ -143,7 +143,7 @@ test('Unit: Downstream keyer: mask', function () {
left: 3,
right: 4,
}
const commands = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
const { commands } = resolveDownstreamKeyerState(DSK1, DSK2, fullDiff)
expect(commands).toHaveLength(1)

const firstCommand = commands[0] as Commands.DownstreamKeyMaskCommand
Expand Down
Loading
Loading