1
0
mirror of https://github.com/videojs/video.js.git synced 2025-11-29 23:07:51 +02:00

feat: add a version method to all advanced plugin instances (#4714)

This commit is contained in:
Brandon Casey
2017-11-07 20:48:24 +00:00
committed by Gary Katsevman
parent c213737f7a
commit acf4153963
2 changed files with 11 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ QUnit.module('Plugin: advanced', {
}
}
MockPlugin.VERSION = '1.0.0';
this.MockPlugin = MockPlugin;
Plugin.registerPlugin('mock', MockPlugin);
},
@@ -59,6 +61,8 @@ QUnit.test('setup', function(assert) {
assert.strictEqual(typeof instance.one, 'function', 'instance is evented');
assert.strictEqual(typeof instance.trigger, 'function', 'instance is evented');
assert.strictEqual(typeof instance.dispose, 'function', 'instance has dispose method');
assert.strictEqual(typeof instance.version, 'function', 'instance has version method');
assert.strictEqual(instance.version(), '1.0.0', 'version function returns VERSION value');
assert.throws(
() => new Plugin(this.player),