Skip to content

Commit

Permalink
fix: Tests for stitcher
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Dec 20, 2024
1 parent 4ed7a45 commit 027f3fc
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 356 deletions.
309 changes: 6 additions & 303 deletions packages/stitcher/test/__snapshots__/interstitials.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`getStaticDateRanges should create dateRanges for vod 1`] = `
"RESTRICT": "SKIP,JUMP",
"RESUME-OFFSET": 0,
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
"TIMELINE-STYLE": "HIGHLIGHT",
},
"id": "1619950355250",
"startDate": DateTime {
Expand Down Expand Up @@ -152,156 +152,6 @@ exports[`getStaticDateRanges should create dateRanges for vod 1`] = `
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A12%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"RESUME-OFFSET": 0,
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "HIGHLIGHT",
},
"id": "1619950365250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 12,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950365250,
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A13%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"RESUME-OFFSET": 0,
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
},
"id": "1619950425250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 13,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950425250,
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A13%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"RESUME-OFFSET": 0,
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
},
"id": "1619950425250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 13,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950425250,
"weekData": null,
},
},
]
`;

Expand Down Expand Up @@ -413,7 +263,7 @@ exports[`getStaticDateRanges should create dateRanges for live 1`] = `
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
"TIMELINE-STYLE": "HIGHLIGHT",
},
"id": "1619950355250",
"startDate": DateTime {
Expand Down Expand Up @@ -454,165 +304,18 @@ exports[`getStaticDateRanges should create dateRanges for live 1`] = `
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A12%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "HIGHLIGHT",
},
"id": "1619950365250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 12,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950365250,
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A13%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
},
"id": "1619950425250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 13,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950425250,
"weekData": null,
},
},
{
"classId": "com.apple.hls.interstitial",
"clientAttributes": {
"ASSET-LIST": "stitcher-endpoint/out/asset-list.json?dt=2021-05-02T10%3A13%3A45.250%2B00%3A00&sid=36bab417-0952-4c23-bdf0-9a424e4651ad",
"CONTENT-MAY-VARY": "YES",
"CUE": "ONCE",
"RESTRICT": "SKIP,JUMP",
"TIMELINE-OCCUPIES": "POINT",
"TIMELINE-STYLE": "PRIMARY",
},
"id": "1619950425250",
"startDate": DateTime {
"_zone": SystemZone {},
"c": {
"day": 2,
"hour": 10,
"millisecond": 250,
"minute": 13,
"month": 5,
"second": 45,
"year": 2021,
},
"invalid": null,
"isLuxonDateTime": true,
"loc": Locale {
"eraCache": {},
"fastNumbersCached": null,
"intl": "en-US",
"locale": "en-US",
"meridiemCache": null,
"monthsCache": {
"format": {},
"standalone": {},
},
"numberingSystem": null,
"outputCalendar": null,
"specifiedLocale": null,
"weekSettings": null,
"weekdaysCache": {
"format": {},
"standalone": {},
},
},
"localWeekData": null,
"o": -0,
"ts": 1619950425250,
"weekData": null,
},
},
]
`;

exports[`getAssets should get assets by interstitials 1`] = `
[
{
"duration": 25,
"url": "https://mock.com/ad_1/master.m3u8",
},
{
"kind": "ad",
"url": "https://mock.com/interstitial1/master.m3u8",
},
{
"duration": 25,
"url": "https://mock.com/ad_1/master.m3u8",
},
]
`;
Loading

0 comments on commit 027f3fc

Please sign in to comment.