1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-24 16:32:21 +00:00
nk20/static/vendor/select2/tests/options/translation-tests.js
Pierre-antoine Comby 70c09da9f8 add static files
2020-02-25 22:15:46 +01:00

29 lines
633 B
JavaScript

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'
);
});