1
0
mirror of synced 2024-11-25 06:16:08 +03:00
select2/tests/data/base-tests.js
2019-08-21 21:44:25 -04:00

30 lines
685 B
JavaScript

QUnit.module('Data adapters - Base');
var BaseData = require('select2/data/base');
var $ = require('jquery');
var Options = require('select2/options');
var options = new Options({});
QUnit.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'
);
});
QUnit.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'
);
});