Commit 2228aa56 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: QUnit tests, uses QUnit.module, again

parent 80fb4dae
QUnit.test("Axis : ", function(assert) {
QUnit.module("Axis", {
});
QUnit.test("axis", function(assert) {
var m = new Model(m); var m = new Model(m);
m.parseJsonData(json_data,100) m.parseJsonData(json_data,100)
......
QUnit.test("console : ", function(assert) {
QUnit.module("Console", {
});
QUnit.test("console", function(assert) {
console = new Com(console) console = new Com(console)
assert.expect(6); assert.expect(6);
......
QUnit.test("graph: svg path builder", function(assert) { QUnit.module("Graph", {
});
QUnit.test("svg path builder", function(assert) {
var m = new Model(m); var m = new Model(m);
m.parseJsonData(json_data,100) m.parseJsonData(json_data,100)
m.loadGermline() m.loadGermline()
...@@ -16,7 +19,7 @@ QUnit.test("graph: svg path builder", function(assert) { ...@@ -16,7 +19,7 @@ QUnit.test("graph: svg path builder", function(assert) {
assert.equal(graph.constructStack(1, stack), " M 70.05,40.95 L 70.35,40.9 L 70.65,40.925 L 70.95,40.85 L 70.95,40.75 L 70.65,40.875 L 70.35,40.7 L 70.05,40.85 Z", "path stack clone 1") assert.equal(graph.constructStack(1, stack), " M 70.05,40.95 L 70.35,40.9 L 70.65,40.925 L 70.95,40.85 L 70.95,40.75 L 70.65,40.875 L 70.35,40.7 L 70.05,40.85 Z", "path stack clone 1")
}); });
QUnit.test("graph: init", function(assert) { QUnit.test("init", function(assert) {
var m = new Model(m); var m = new Model(m);
m.parseJsonData(json_data,100) m.parseJsonData(json_data,100)
m.loadGermline() m.loadGermline()
......
QUnit.test("model_loader: getConvertedBoundary", function(assert) {
QUnit.module("Model_loader", {
});
QUnit.test("getConvertedBoundary", function(assert) {
model_loader = new Model_loader() model_loader = new Model_loader()
seg = {'a': {'toto': 13, 'bla': 2}} seg = {'a': {'toto': 13, 'bla': 2}}
assert.equal(model_loader.getConvertedBoundary(seg['a'], 'bl', 'a'), 2, "convertSeg") assert.equal(model_loader.getConvertedBoundary(seg['a'], 'bl', 'a'), 2, "convertSeg")
......
QUnit.test("Segmenter : ", function(assert) { QUnit.module("Segmenter", {
});
QUnit.test("segmenter", function(assert) {
var m = new Model(); var m = new Model();
m.parseJsonData(json_data,100) m.parseJsonData(json_data,100)
...@@ -59,7 +63,7 @@ QUnit.test("Segmenter : ", function(assert) { ...@@ -59,7 +63,7 @@ QUnit.test("Segmenter : ", function(assert) {
assert.equal(document.getElementsByClassName("stats_content")[0].innerHTML, "1 clone, 3 reads ", "stats (1 clone with few reads) : Ok") assert.equal(document.getElementsByClassName("stats_content")[0].innerHTML, "1 clone, 3 reads ", "stats (1 clone with few reads) : Ok")
}); });
QUnit.test("Sequence : ", function(assert) { QUnit.test("sequence", function(assert) {
var m = new Model(); var m = new Model();
m.parseJsonData(json_data,100) m.parseJsonData(json_data,100)
m.initClones() m.initClones()
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
</script> </script>
<script src="./testFiles/dbscan_test.js"></script> <script src="./testFiles/dbscan_test.js"></script>
<script src="./testFiles/model_test.js"></script> <script src="./testFiles/model_test.js"></script>
<script src="./testFiles/model_loader_test.js"></script>
<script src="./testFiles/clone_test.js"></script> <script src="./testFiles/clone_test.js"></script>
<script src="./testFiles/scatterPlot_test.js"></script> <script src="./testFiles/scatterPlot_test.js"></script>
<script src="./testFiles/axis_test.js"></script> <script src="./testFiles/axis_test.js"></script>
...@@ -106,7 +107,6 @@ ...@@ -106,7 +107,6 @@
<script src="./testFiles/segmenter_test.js"></script> <script src="./testFiles/segmenter_test.js"></script>
<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/speed_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