Skip to content

Commit 999b800

Browse files
committed
chore: fix unit test & CI
1 parent 45fa3d2 commit 999b800

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

meteor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"test": "meteor npm run check-types && meteor npm run unit",
2020
"watch": "jest --watch",
2121
"update-snapshots": "jest --updateSnapshot",
22-
"ci:lint": "meteor npm run check-types && meteor npm run lint",
22+
"ci:lint": "meteor yarn check-types && meteor yarn lint",
2323
"cov-open": "open-cli coverage/lcov-report/index.html",
2424
"cov": "meteor npm run unitcov && meteor npm run cov-open",
2525
"license-validate": "node ../scripts/checkLicenses.js --allowed=\"MIT,BSD,ISC,Apache,Unlicense,CC0,LGPL,CC BY 3.0,CC BY 4.0,MPL 2.0,Python 2.0\" --excludePackages=timecode,rxjs/ajax,rxjs/fetch,rxjs/internal-compatibility,nw-pre-gyp-module-test,rxjs/operators,rxjs/testing,rxjs/webSocket,undefined,i18next-conv,@fortawesome/fontawesome-common-types,argv,indexof,custom-license,private,public-domain-module,@sofie-automation/corelib,@sofie-automation/shared-lib,@sofie-automation/job-worker",

packages/job-worker/src/ingest/mosDevice/__tests__/mosIngest.test.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
handleMosSwapStories,
1414
} from '../mosStoryJobs'
1515
import { handleMosRundownData, handleMosRundownReadyToAir, handleMosRundownStatus } from '../mosRundownJobs'
16-
import { parseMosString } from '../lib'
16+
import { getMosIngestSegmentExternalId, parseMosString } from '../lib'
1717
import { MockJobContext, setupDefaultJobEnvironment } from '../../../__mocks__/context'
1818
import { setupMockIngestDevice, setupMockShowStyleCompound } from '../../../__mocks__/presetCollections'
1919
import { fixSnapshot } from '../../../__mocks__/helpers/snapshot'
@@ -569,7 +569,9 @@ describe('Test recieved mos ingest payloads', () => {
569569
replace: false,
570570
})
571571
).rejects.toThrow(
572-
`Parts ${mosTypes.mosString128.stringify(newPartData.ID)} already exist in rundown ${rundown.externalId}`
572+
`Parts ${getMosIngestSegmentExternalId(
573+
mosTypes.mosString128.stringify(newPartData.ID)
574+
)} already exist in rundown ${rundown.externalId}`
573575
)
574576
})
575577

@@ -673,7 +675,9 @@ describe('Test recieved mos ingest payloads', () => {
673675
replace: true,
674676
})
675677
).rejects.toThrow(
676-
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
678+
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
679+
rundown.externalId
680+
} not found`
677681
)
678682

679683
expect(
@@ -1077,7 +1081,9 @@ describe('Test recieved mos ingest payloads', () => {
10771081
stories,
10781082
})
10791083
).rejects.toThrow(
1080-
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
1084+
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
1085+
rundown.externalId
1086+
} not found`
10811087
)
10821088
})
10831089

@@ -1099,7 +1105,9 @@ describe('Test recieved mos ingest payloads', () => {
10991105
stories,
11001106
})
11011107
).rejects.toThrow(
1102-
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
1108+
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
1109+
rundown.externalId
1110+
} not found`
11031111
)
11041112
})
11051113

0 commit comments

Comments
 (0)