mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge remote-tracking branch 'ducksboard/bug-493-jquery-no-global-fail'
* ducksboard/bug-493-jquery-no-global-fail: Fix for bug #493 including unit tests to prove.
This commit is contained in:
38
test/jquery.gridster_test.js
Normal file
38
test/jquery.gridster_test.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/
|
||||
/*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/
|
||||
/*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/
|
||||
(function($) {
|
||||
|
||||
/*
|
||||
======== A Handy Little QUnit Reference ========
|
||||
http://docs.jquery.com/QUnit
|
||||
|
||||
Test methods:
|
||||
expect(numAssertions)
|
||||
stop(increment)
|
||||
start(decrement)
|
||||
Test assertions:
|
||||
ok(value, [message])
|
||||
equal(actual, expected, [message])
|
||||
notEqual(actual, expected, [message])
|
||||
deepEqual(actual, expected, [message])
|
||||
notDeepEqual(actual, expected, [message])
|
||||
strictEqual(actual, expected, [message])
|
||||
notStrictEqual(actual, expected, [message])
|
||||
raises(block, [expected], [message])
|
||||
*/
|
||||
|
||||
module('jQuery#gridster', {
|
||||
setup: function() {
|
||||
|
||||
this.el = $('#qunit-fixture').find(".wrapper ul");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
test('is chainable', function() {
|
||||
// Not a bad test to run on collection methods.
|
||||
strictEqual(this.el, this.el.gridster(), 'should be chaninable');
|
||||
});
|
||||
|
||||
}(jQuery));
|
Reference in New Issue
Block a user