projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite tests to use ES6 modules.
[dygraphs.git]
/
auto_tests
/
tests
/
to_dom_coords.js
diff --git
a/auto_tests/tests/to_dom_coords.js
b/auto_tests/tests/to_dom_coords.js
index
5aa4520
..
4540501
100644
(file)
--- a/
auto_tests/tests/to_dom_coords.js
+++ b/
auto_tests/tests/to_dom_coords.js
@@
-3,20
+3,17
@@
*
* @author danvk@google.com (Dan Vanderkam)
*/
*
* @author danvk@google.com (Dan Vanderkam)
*/
+import Dygraph from '../../src/dygraph';
+import * as utils from '../../src/dygraph-utils';
-describe("to-dom-coords", function() {
+import Proxy from './Proxy';
+import CanvasAssertions from './CanvasAssertions';
+import {assertDeepCloseTo} from './custom_asserts';
-var origFunc = Dygraph.getContext;
-beforeEach(function() {
- document.body.innerHTML = "<div id='graph'></div>";
- Dygraph.getContext = function(canvas) {
- return new Proxy(origFunc(canvas));
- }
-});
+describe("to-dom-coords", function() {
-afterEach(function() {
- Dygraph.getContext = origFunc;
-});
+cleanupAfterEach();
+useProxyCanvas(utils, Proxy);
// Checks that toDomCoords and toDataCoords are inverses of one another.
var checkForInverses = function(g) {
// Checks that toDomCoords and toDataCoords are inverses of one another.
var checkForInverses = function(g) {