mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
29 lines
850 B
JavaScript
29 lines
850 B
JavaScript
/* global require */
|
|
"use strict";
|
|
define([
|
|
'QUnit',
|
|
'jquery',
|
|
'gridster'
|
|
], function(QUnit, $, gridster) {
|
|
|
|
QUnit.module("Gridster AMD", {
|
|
setup: function () {
|
|
},
|
|
teardown: function () {
|
|
}
|
|
});
|
|
|
|
QUnit.test('window.$ should be undefined.', function() {
|
|
equal(typeof window.$, 'undefined', 'window.$ should be undefined');
|
|
equal(typeof window.jQuery, 'undefined', 'window.jQuery should be undefined');
|
|
});
|
|
|
|
|
|
QUnit.test('gridster should be initialized.', function() {
|
|
$('.wrapper ul').gridster();
|
|
equal($(".wrapper").hasClass('ready'), true, 'Gridster should initialized wrapper.');
|
|
equal($(".wrapper ul li").length, $(".gs-w").length, 'grid elements get a .gs-w class');
|
|
});
|
|
}
|
|
);
|