Commit | Line | Data |
---|---|---|
395e98a3 DV |
1 | /** |
2 | * @fileoverview Tests zero and one-point charts. | |
3 | * These don't have to render nicely, they just have to not crash. | |
4 | * | |
5 | * @author dan@dygraphs.com (Dan Vanderkam) | |
6 | */ | |
7 | var pathologicalCasesTestCase = TestCase("pathological-cases"); | |
8 | ||
9 | pathologicalCasesTestCase.prototype.setUp = function() { | |
10 | document.body.innerHTML = "<div id='graph'></div>"; | |
11 | }; | |
12 | ||
13 | pathologicalCasesTestCase.prototype.tearDown = function() { | |
14 | }; | |
15 | ||
16 | pathologicalCasesTestCase.prototype.testZeroPoint = function() { | |
17 | var opts = { | |
18 | width: 480, | |
19 | height: 320 | |
20 | }; | |
21 | var data = "X,Y\n"; | |
22 | ||
23 | var graph = document.getElementById("graph"); | |
24 | var g = new Dygraph(graph, data, opts); | |
25 | }; | |
26 | ||
27 | pathologicalCasesTestCase.prototype.testOnePoint = function() { | |
28 | var opts = { | |
29 | width: 480, | |
30 | height: 320 | |
31 | }; | |
32 | var data = "X,Y\n" + | |
33 | "1,2\n"; | |
34 | ||
35 | var graph = document.getElementById("graph"); | |
36 | var g = new Dygraph(graph, data, opts); | |
37 | }; |