mirror of
https://github.com/videojs/video.js.git
synced 2024-12-12 11:15:04 +02:00
b387437aed
Remove Flash Tech from core. Use videojs-flash if flash is needed. Also, update DOM method names. BREAKING CHANGE: remove flash tech from core.
24 lines
635 B
JavaScript
24 lines
635 B
JavaScript
/* eslint-env qunit */
|
|
import document from 'global/document';
|
|
import * as DomData from '../../../src/js/utils/dom-data';
|
|
|
|
QUnit.module('dom-data');
|
|
|
|
QUnit.test('should get and remove data from an element', function(assert) {
|
|
const el = document.createElement('div');
|
|
const data = DomData.getData(el);
|
|
|
|
assert.strictEqual(typeof data, 'object', 'data object created');
|
|
|
|
// Add data
|
|
const testData = {asdf: 'fdsa'};
|
|
|
|
data.test = testData;
|
|
assert.strictEqual(DomData.getData(el).test, testData, 'data added');
|
|
|
|
// Remove all data
|
|
DomData.removeData(el);
|
|
|
|
assert.notOk(DomData.hasData(el), 'cached item emptied');
|
|
});
|