Rewrite tests to use ES6 modules.
[dygraphs.git] / auto_tests / tests / stacked.js
index 5e4c55c..3d997af 100644 (file)
@@ -3,20 +3,18 @@
  *
  * @author dan@dygraphs.com (Dan Vanderkam)
  */
-describe("stacked", function() {
 
-var _origGetContext = Dygraph.getContext;
+import Dygraph from '../../src/dygraph';
+import * as utils from '../../src/dygraph-utils';
 
-beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
-  Dygraph.getContext = function(canvas) {
-    return new Proxy(_origGetContext(canvas));
-  }
-});
+import Proxy from './Proxy';
+import CanvasAssertions from './CanvasAssertions';
+import Util from './Util';
 
-afterEach(function() {
-  Dygraph.getContext = _origGetContext;
-});
+describe("stacked", function() {
+
+cleanupAfterEach();
+useProxyCanvas(utils, Proxy);
 
 it('testCorrectColors', function() {
   var opts = {