Skip to content

Commit

Permalink
fix: use es6 class inheritance
Browse files Browse the repository at this point in the history
The warning below is appearing in the browser console:

```
VIDEOJS: WARN: videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0
```

Issue silvermine#152
  • Loading branch information
Eric Fortmeyer committed Feb 16, 2023
1 parent cab6260 commit 26e7281
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/ChromcastButton.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

var expect = require('expect.js');

const chromecastButton = require('../src/js/components/ChromecastButton');

describe('ChromecastButton', function() {
it('should not call videojs.extend', function() {
const videoJsSpy = {
extend: function() {
expect().fail('videojs.extends is deprecated');
},
getComponent: function() {
// no op
},
registerComponent: function() {
// no op
},
};

chromecastButton(videoJsSpy);
expect().to.not.fail();
});
});
24 changes: 24 additions & 0 deletions tests/ChromcastTech.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

var expect = require('expect.js');

const chromecastTech = require('../src/js/tech/ChromecastTech');

describe('ChromecastTech', function() {
it('should not call videojs.extend', function() {
const videoJsSpy = {
extend: function() {
expect().fail('videojs.extends is deprecated');
},
getComponent: function() {
// no op
},
registerComponent: function() {
// no op
},
};

chromecastTech(videoJsSpy);
expect().to.not.fail();
});
});

0 comments on commit 26e7281

Please sign in to comment.