Skip to content

Commit

Permalink
chore: fix unit test & CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Dec 10, 2024
1 parent 45fa3d2 commit 999b800
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "meteor npm run check-types && meteor npm run unit",
"watch": "jest --watch",
"update-snapshots": "jest --updateSnapshot",
"ci:lint": "meteor npm run check-types && meteor npm run lint",
"ci:lint": "meteor yarn check-types && meteor yarn lint",
"cov-open": "open-cli coverage/lcov-report/index.html",
"cov": "meteor npm run unitcov && meteor npm run cov-open",
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
handleMosSwapStories,
} from '../mosStoryJobs'
import { handleMosRundownData, handleMosRundownReadyToAir, handleMosRundownStatus } from '../mosRundownJobs'
import { parseMosString } from '../lib'
import { getMosIngestSegmentExternalId, parseMosString } from '../lib'
import { MockJobContext, setupDefaultJobEnvironment } from '../../../__mocks__/context'
import { setupMockIngestDevice, setupMockShowStyleCompound } from '../../../__mocks__/presetCollections'
import { fixSnapshot } from '../../../__mocks__/helpers/snapshot'
Expand Down Expand Up @@ -569,7 +569,9 @@ describe('Test recieved mos ingest payloads', () => {
replace: false,
})
).rejects.toThrow(
`Parts ${mosTypes.mosString128.stringify(newPartData.ID)} already exist in rundown ${rundown.externalId}`
`Parts ${getMosIngestSegmentExternalId(
mosTypes.mosString128.stringify(newPartData.ID)
)} already exist in rundown ${rundown.externalId}`
)
})

Expand Down Expand Up @@ -673,7 +675,9 @@ describe('Test recieved mos ingest payloads', () => {
replace: true,
})
).rejects.toThrow(
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
rundown.externalId
} not found`
)

expect(
Expand Down Expand Up @@ -1077,7 +1081,9 @@ describe('Test recieved mos ingest payloads', () => {
stories,
})
).rejects.toThrow(
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
rundown.externalId
} not found`
)
})

Expand All @@ -1099,7 +1105,9 @@ describe('Test recieved mos ingest payloads', () => {
stories,
})
).rejects.toThrow(
`Part ${mosTypes.mosString128.stringify(beforeStoryId)} in rundown ${rundown.externalId} not found`
`Part ${getMosIngestSegmentExternalId(mosTypes.mosString128.stringify(beforeStoryId))} in rundown ${
rundown.externalId
} not found`
)
})

Expand Down

0 comments on commit 999b800

Please sign in to comment.