projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fix for dygraph point selection touch event.
[dygraphs.git]
/
auto_tests
/
tests
/
sanity.js
diff --git
a/auto_tests/tests/sanity.js
b/auto_tests/tests/sanity.js
index
05c9b54
..
e1d37ab
100644
(file)
--- a/
auto_tests/tests/sanity.js
+++ b/
auto_tests/tests/sanity.js
@@
-24,14
+24,15
@@
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
-var DEAD_SIMPLE_DATA = [[ 10, 2100 ]];
-
var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]]
;
+
+
import Dygraph from '../../src/dygraph'
;
describe("dygraphs-sanity", function() {
describe("dygraphs-sanity", function() {
-beforeEach(function() {
- document.body.innerHTML = "<div id='graph'></div>";
-});
+var DEAD_SIMPLE_DATA = 'X,Y\n10,2100';
+var ZERO_TO_FIFTY = 'X,Y\n10,0\n20,50';
+
+cleanupAfterEach();
/**
* The sanity test of sanity tests.
/**
* The sanity test of sanity tests.
@@
-99,7
+100,7
@@
it('testToDomYCoord', function() {
assert.equal(0, g.toDomYCoord(50));
for (var x = 0; x <= 50; x++) {
assert.equal(0, g.toDomYCoord(50));
for (var x = 0; x <= 50; x++) {
- assert.
equalsDelta
(50 - x, g.toDomYCoord(x), 0.00001);
+ assert.
closeTo
(50 - x, g.toDomYCoord(x), 0.00001);
}
g.updateOptions({valueRange: null, axes: {y: {valueRange: [0, 50]}}});
}
g.updateOptions({valueRange: null, axes: {y: {valueRange: [0, 50]}}});
@@
-107,7
+108,7
@@
it('testToDomYCoord', function() {
assert.equal(0, g.toDomYCoord(50));
for (var x = 0; x <= 50; x++) {
assert.equal(0, g.toDomYCoord(50));
for (var x = 0; x <= 50; x++) {
- assert.
equalsDelta
(50 - x, g.toDomYCoord(x), 0.00001);
+ assert.
closeTo
(50 - x, g.toDomYCoord(x), 0.00001);
}
});
}
});