Skip to content

Commit

Permalink
chore: attempt to fix CI test issue box#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Chan committed Sep 16, 2019
1 parent a0f3a5b commit b824ffd
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/lib/viewers/media/__tests__/DashViewer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { VIEWER_EVENT } from '../../../events';

let dash;
let stubs = {};
let mediaElRef;

const CSS_CLASS_MEDIA = 'bp-media';
const CSS_CLASS_HD = 'bp-media-controls-is-hd';
Expand Down Expand Up @@ -99,6 +100,7 @@ describe('lib/viewers/media/DashViewer', () => {
Object.defineProperty(BaseViewer.prototype, 'setup', { value: sandbox.mock() });
dash.containerEl = containerEl;
dash.setup();
mediaElRef = dash.mediaEl;
});

afterEach(() => {
Expand All @@ -107,6 +109,7 @@ describe('lib/viewers/media/DashViewer', () => {
Object.defineProperty(BaseViewer.prototype, 'setup', { value: setupFunc });

if (dash && typeof dash.destroy === 'function' && !dash.destroyed) {
dash.mediaEl = mediaElRef;
dash.destroy();
}

Expand Down Expand Up @@ -1362,16 +1365,6 @@ describe('lib/viewers/media/DashViewer', () => {
});

describe('determinePlayLength()', () => {
let originalMediaEl;

beforeEach(() => {
originalMediaEl = dash.mediaEl;
});

afterEach(() => {
dash.mediaEl = originalMediaEl;
});

it('should return -1 if mediaEl does not exist', () => {
dash.mediaEl = null;

Expand Down

0 comments on commit b824ffd

Please sign in to comment.