mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Tests are build with mocha + chai, and you can run them from the command line with `grunt karma` or opening `test/index.html` in your browser. This is a first approach, there are hundreds of tests more that should be added. I’ve ported some tests on PRs but more needs to be done.
40 lines
1.0 KiB
HTML
40 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>gridster.js tests</title>
|
|
<link rel="stylesheet" href="../../node_modules/mocha/mocha.css" />
|
|
|
|
<link rel="stylesheet" href="../../dist/jquery.gridster.css" />
|
|
<script src="../../node_modules/requirejs/require.js"></script>
|
|
|
|
<script src="../../node_modules/mocha/mocha.js"></script>
|
|
<script>mocha.setup('bdd');</script>
|
|
|
|
<script>
|
|
require.config({
|
|
baseUrl : '../../',
|
|
|
|
paths: {
|
|
mocha: 'node_modules/mocha/mocha',
|
|
chai: 'node_modules/chai/chai',
|
|
jquery: 'node_modules/jquery/dist/jquery',
|
|
gridster: 'dist/jquery.gridster'
|
|
}
|
|
|
|
});
|
|
|
|
require(['jquery'], function($) {
|
|
$.noConflict( true );
|
|
|
|
require(['test/amd/index'], function(Gridster) {
|
|
mocha.setup('bdd');
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="mocha"></div>
|
|
<div id="fixture"></div>
|
|
</body>
|
|
</html> |