1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-26 01:12:23 +00:00
nk20/static/vendor/select2/tests/data/base-tests.js

30 lines
667 B
JavaScript
Raw Normal View History

2020-02-25 21:15:46 +00:00
module('Data adapters - Base');
var BaseData = require('select2/data/base');
var $ = require('jquery');
var Options = require('select2/options');
var options = new Options({});
test('current is required', function (assert) {
var data = new BaseData($('#qunit-fixture select'), options);
assert.throws(
function () {
data.current(function () {});
},
'current has no default implementation'
);
});
test('query is required', function (assert) {
var data = new BaseData($('#qunit-fixture select'), options);
assert.throws(
function () {
data.query({}, function () {});
},
'query has no default implementation'
);
});