mirror of
https://github.com/videojs/video.js.git
synced 2024-12-14 11:23:30 +02:00
17 lines
395 B
JavaScript
17 lines
395 B
JavaScript
import extendFn from '../../src/js/extend.js';
|
|
|
|
q.module('extend.js');
|
|
|
|
test('should add implicit parent constructor call', function(){
|
|
var superCalled = false;
|
|
var Parent = function() {
|
|
superCalled = true;
|
|
};
|
|
var Child = extendFn(Parent, {
|
|
foo: 'bar'
|
|
});
|
|
var child = new Child();
|
|
ok(superCalled, 'super constructor called');
|
|
ok(child.foo, 'child properties set');
|
|
});
|