Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Apr 19, 2024
1 parent 84fbd73 commit 75a8985
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/commands/__tests__/converters-default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,10 @@ export const DefaultCommandConverters: CommandTestConverterSet = {
inputTalkbackGain: (val: number): PropertyAliasResult => ({ val: Math.round(val * 100) }),
inputMasterEnabled: (val: boolean): PropertyAliasResult => ({ val: !val, name: 'inputMasterMuted' }),
},
processDeserialized: (v) => {
delete v.inputTalkbackMuted
return v
},
},
CFMH: {
idAliases: {},
Expand All @@ -1120,6 +1124,7 @@ export const DefaultCommandConverters: CommandTestConverterSet = {
inputSidetoneGain: (val: number): PropertyAliasResult => ({ val: Math.round(val * 100) }),
inputTalkbackGain: (val: number): PropertyAliasResult => ({ val: Math.round(val * 100) }),
inputMasterEnabled: (val: boolean): PropertyAliasResult => ({ val: !val, name: 'inputMasterMuted' }),
inputTalkbackEnabled: (val: boolean): PropertyAliasResult => ({ val: !val, name: 'inputTalkbackMuted' }),
},
},
MOCP: {
Expand Down
12 changes: 10 additions & 2 deletions src/commands/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function runTestForCommand(commandParser: CommandParser, i: number, testCase: Te

const versionName = ProtocolVersion[testCase.firstVersion] || `v${testCase.firstVersion}`

// if (testCase.name !== 'FTFD') return
// if (testCase.name !== 'CFMH') return
// if (i !== 1673) return

let matchedCase = false
Expand Down Expand Up @@ -197,7 +197,14 @@ describe('Commands vs LibAtem', () => {
.sort()

// Temporarily ignore these missing cases
knownNames = knownNames.filter((n) => !n.startsWith('InCm') && !n.startsWith('TlSr') && !n.startsWith('_VMC'))
knownNames = knownNames.filter(
(n) =>
!n.startsWith('InCm') &&
!n.startsWith('TlSr') &&
!n.startsWith('_VMC') &&
!n.startsWith('FAMS') &&
!n.startsWith('CFMS')
)

knownNames.sort()

Expand All @@ -213,6 +220,7 @@ describe('Commands vs LibAtem', () => {
case 'FTSU': // Unkown props getting overwritten by generator: https://github.com/LibAtem/LibAtem/blob/master/LibAtem/Commands/DataTransfer/DataTransferDownloadRequestCommand.cs
case 'CCmd': // LibAtem is incorrect
case 'CCdP': // LibAtem is incorrect
case 'CFMH': // LibAtem is missing properties
continue
}

Expand Down

0 comments on commit 75a8985

Please sign in to comment.