Merge pull request #674 from danvk/module
[dygraphs.git] / auto_tests / tests / error_bars.js
index e04acde..4fd3369 100644 (file)
@@ -3,23 +3,17 @@
  *
  * @author danvk@google.com (Dan Vanderkam)
  */
-describe("error-bars", function() {
 
-beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
-});
+import Dygraph from '../../src/dygraph';
+import * as utils from '../../src/dygraph-utils';
+import Util from './Util';
+import Proxy from './Proxy';
+import CanvasAssertions from './CanvasAssertions';
 
-var _origFunc = Dygraph.getContext;
-beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
-  Dygraph.getContext = function(canvas) {
-    return new Proxy(_origFunc(canvas));
-  }
-});
+describe("error-bars", function() {
 
-afterEach(function() {
-  Dygraph.getContext = _origFunc;
-});
+cleanupAfterEach();
+useProxyCanvas(utils, Proxy);
 
 it('testErrorBarsDrawn', function() {
   var opts = {