1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
video.js/test/unit/loading-spinner.test.js

17 lines
593 B
JavaScript

/* eslint-env qunit */
import LoadingSpinner from '../../src/js/loading-spinner.js';
import TestHelpers from './test-helpers.js';
import videojs from '../../src/js/video.js';
QUnit.module('Loading Spinner', {});
QUnit.test('should localize on languagechange', function(assert) {
const player = TestHelpers.makePlayer({});
const spinner = new LoadingSpinner(player);
videojs.addLanguage('test', {'{1} is loading.': '{1} LOADING'});
player.language('test');
assert.equal(spinner.$('.vjs-control-text').textContent, 'Video Player LOADING', 'loading spinner text is localized');
});