Skip to content

Commit

Permalink
chore: add failing unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
bwallberg committed Feb 22, 2024
1 parent 1dc8f20 commit 3333ec2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/manifests/handlers/dash/segment.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import dashSegmentHandler from './segment';

describe('dashSegmentHandler', () => {
it('handles when a representationId contains underscore', async () => {
const result = await dashSegmentHandler({
queryStringParameters: {
url: 'https://stream.with_underscore.com/live-$RepresentationID$-$Time$.dash'
},
path: '/segment_82008145102133_audio_track_0_0_nor=128000_128000',
requestContext: {
elb: { targetGroupArn: '' }
},
isBase64Encoded: false,
httpMethod: 'GET',
body: '',
headers: {}
});
expect(result.headers.Location).toBe(
'https://stream.with_underscore.com/live-audio_track_0_0_nor=128000_128000-82008145102133.dash'
);
});
});

0 comments on commit 3333ec2

Please sign in to comment.