projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump to version 2 🎉
[dygraphs.git]
/
auto_tests
/
tests
/
scientific_notation.js
diff --git
a/auto_tests/tests/scientific_notation.js
b/auto_tests/tests/scientific_notation.js
index
d9dab6c
..
a502484
100644
(file)
--- a/
auto_tests/tests/scientific_notation.js
+++ b/
auto_tests/tests/scientific_notation.js
@@
-5,14
+5,13
@@
*
* @author danvk@google.com (Dan Vanderkam)
*/
*
* @author danvk@google.com (Dan Vanderkam)
*/
-describe("scientific-notation", function() {
-beforeEach(function() {
- document.body.innerHTML = "<div id='graph'></div>";
-});
+import Dygraph from '../../src/dygraph';
+import {assertDeepCloseTo} from './custom_asserts';
-afterEach(function() {
-});
+describe("scientific-notation", function() {
+
+cleanupAfterEach();
function getXValues(g) {
var xs = [];
function getXValues(g) {
var xs = [];
@@
-32,7
+31,7
@@
it('testScientificInput', function() {
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
- assert
.equalsDelta
([10, 20, 30, 40], getXValues(g), 1e-6);
+ assert
DeepCloseTo
([10, 20, 30, 40], getXValues(g), 1e-6);
});
it('testScientificInputPlus', function() {
});
it('testScientificInputPlus', function() {
@@
-45,7
+44,7
@@
it('testScientificInputPlus', function() {
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
- assert
.equalsDelta
([10, 20, 30, 40], getXValues(g), 1e-6);
+ assert
DeepCloseTo
([10, 20, 30, 40], getXValues(g), 1e-6);
});
it('testScientificInputMinus', function() {
});
it('testScientificInputMinus', function() {
@@
-58,7
+57,7
@@
it('testScientificInputMinus', function() {
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
- assert
.equalsDelta
([0.1, 0.2, 0.3, 0.4], getXValues(g), 1e-6);
+ assert
DeepCloseTo
([0.1, 0.2, 0.3, 0.4], getXValues(g), 1e-6);
});
it('testScientificInputMinusCap', function() {
});
it('testScientificInputMinusCap', function() {
@@
-71,7
+70,7
@@
it('testScientificInputMinusCap', function() {
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, {});
- assert
.equalsDelta
([0.1, 0.2, 0.3, 0.4], getXValues(g), 1e-6);
+ assert
DeepCloseTo
([0.1, 0.2, 0.3, 0.4], getXValues(g), 1e-6);
});
});
});
});