short-url/public/vendor/select2/tests/options/translation-tests.js
Supan Adit Pratama b2e434483d first commit
2020-07-01 15:57:45 +07:00

29 lines
633 B
JavaScript
Executable File
Vendored

module('Options - Translations');
var $ = require('jquery');
var Options = require('select2/options');
test('partial dictionaries can be passed', function (assert) {
var options = new Options({
language: {
searching: function () {
return 'Something';
}
}
});
var translations = options.get('translations');
assert.equal(
translations.get('searching')(),
'Something',
'The partial dictionary still overrides translations'
);
assert.equal(
translations.get('noResults')(),
'No results found',
'You can still get English translations for keys not passed in'
);
});