Skip to content

Commit

Permalink
feat(playertesting): improve test structure based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandkakonyi committed Dec 13, 2023
1 parent b06668a commit 118b30c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions integration_test/tests/playbackTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@ import {
import { Sources } from './helper/Sources';

export default (spec: TestScope) => {
spec.describe('calling player API when a source is loaded', () => {
spec.it(
'emits a Play and Playing events after calling play API',
async () => {
await startPlayerTest({}, async () => {
await loadSourceConfig(Sources.artOfMotionHls);
await callPlayerAndExpectEvents((player) => {
player.play();
}, EventSequence(EventType.Play, EventType.Playing));
});
}
);
spec.it('emits a Paused event after calling pause API', async () => {
spec.describe('calling play when a source is loaded', () => {
spec.it('emits a Play and Playing events', async () => {
await startPlayerTest({}, async () => {
await loadSourceConfig(Sources.artOfMotionHls);
await callPlayerAndExpectEvents((player) => {
player.play();
}, EventSequence(EventType.Play, EventType.Playing));
});
});
});
spec.describe('calling pause when a source is loaded', () => {
spec.it('emits a Paused event', async () => {
await startPlayerTest({}, async () => {
await loadSourceConfig(Sources.artOfMotionHls);
await playFor(1);
Expand Down

0 comments on commit 118b30c

Please sign in to comment.