1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00
video.js/test/unit/extend.test.js

19 lines
446 B
JavaScript
Raw Normal View History

/* eslint-env qunit */
import extendFn from '../../src/js/extend.js';
QUnit.module('extend.js');
QUnit.test('should add implicit parent constructor call', function() {
let superCalled = false;
const Parent = function() {
superCalled = true;
};
const Child = extendFn(Parent, {
foo: 'bar'
});
const child = new Child();
QUnit.ok(superCalled, 'super constructor called');
QUnit.ok(child.foo, 'child properties set');
});