Skip to content

Commit 79fa78c

Browse files
committed
fix test
1 parent c0b2df3 commit 79fa78c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

dotcom-rendering/src/model/enhanceCards.test.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import type { FEMediaAsset, FEMediaAtom } from '../frontend/feFront';
22
import { getActiveMediaAtom } from './enhanceCards';
33

44
describe('Enhance Cards', () => {
5-
it('filters out m3u8 assets until supported by DCR', () => {
5+
it('prioritises m3u8 assets over MP4 assets', () => {
66
const videoReplace = true;
77
const assets: FEMediaAsset[] = [
88
{
9-
id: 'https://guim-example.co.uk/atomID-1.m3u8',
9+
id: 'https://guim-example.co.uk/atomID-1.mp4',
1010
version: 1,
1111
platform: 'Url',
12-
mimeType: 'application/vnd.apple.mpegurl',
12+
mimeType: 'video/mp4',
1313
},
1414
{
15-
id: 'https://guim-example.co.uk/atomID-1.mp4',
15+
id: 'https://guim-example.co.uk/atomID-1.m3u8',
1616
version: 1,
1717
platform: 'Url',
18-
mimeType: 'video/mp4',
18+
mimeType: 'application/x-mpegURL',
1919
},
2020
];
2121
const mediaAtom: FEMediaAtom = {
@@ -39,7 +39,16 @@ describe('Enhance Cards', () => {
3939
height: 400,
4040
image: '',
4141
type: 'LoopVideo',
42-
videoId: 'https://guim-example.co.uk/atomID-1.mp4',
42+
sources: [
43+
{
44+
mimeType: 'application/x-mpegURL',
45+
src: 'https://guim-example.co.uk/atomID-1.m3u8',
46+
},
47+
{
48+
mimeType: 'video/mp4',
49+
src: 'https://guim-example.co.uk/atomID-1.mp4',
50+
},
51+
],
4352
width: 500,
4453
});
4554
});

0 commit comments

Comments
 (0)