mirror of
https://github.com/videojs/video.js.git
synced 2024-12-14 11:23:30 +02:00
15 lines
325 B
JavaScript
15 lines
325 B
JavaScript
/* eslint-env qunit */
|
|
import * as Fn from '../../../src/js/utils/fn.js';
|
|
|
|
QUnit.module('fn');
|
|
|
|
QUnit.test('should add context to a function', function(assert) {
|
|
const newContext = { test: 'obj'};
|
|
const asdf = function() {
|
|
assert.ok(this === newContext);
|
|
};
|
|
const fdsa = Fn.bind(newContext, asdf);
|
|
|
|
fdsa();
|
|
});
|