Commit 65d890a7 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: add speed tests to QUnit tests

See #2196.
parent 937fc4b8
QUnit.test("Speed: many clones", function(assert) {
var data = dataWithManyClones(42);
assert.equal(data["clones"].length, 42, "dataWithManyClones -> 42");
});
QUnit.test("Speed: without views", function(assert) {
var m = new Model();
console.log(speedTest(m));
assert.equal(m.clones.length, 101, "");
});
QUnit.test("Speed: with views", function(assert) {
var m = new Model();
var sp = new ScatterPlot("visu", m);
var segment = new Segment("segment", m);
var list = new List("list", "data", m);
console.log(speedTest(m));
assert.equal(m.clones.length, 101, "");
});
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<script type="text/javascript" src='../../js/pdf.js'></script> <script type="text/javascript" src='../../js/pdf.js'></script>
<script type="text/javascript" src='../../js/database.js' data-cover></script> <script type="text/javascript" src='../../js/database.js' data-cover></script>
<script type="text/javascript" src='../../js/tools.js' data-cover></script> <script type="text/javascript" src='../../js/tools.js' data-cover></script>
<script type="text/javascript" src='../../js/speed_test.js' data-cover></script>
<script type="text/javascript" src="./testFiles/data_test.js"></script> <script type="text/javascript" src="./testFiles/data_test.js"></script>
<!-- needed to load form with jQuery --> <!-- needed to load form with jQuery -->
...@@ -106,5 +107,6 @@ ...@@ -106,5 +107,6 @@
<script src="./testFiles/tools_test.js"></script> <script src="./testFiles/tools_test.js"></script>
<script src="./testFiles/germline_test.js"></script> <script src="./testFiles/germline_test.js"></script>
<script src="./testFiles/model_loader_test.js"></script> <script src="./testFiles/model_loader_test.js"></script>
<script src="./testFiles/speed_test.js"></script>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment