Merge pull request #674 from danvk/module
[dygraphs.git] / auto_tests / tests / step_plot_per_series.js
index a5ff5ee..805a65a 100644 (file)
@@ -8,24 +8,17 @@
  *
  * @author julian.eichstaedt@ch.sauter-bc.com (Fr. Sauter AG)
  */
-describe("step-plot-per-series", function() {
 
-beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
-});
+import Dygraph from '../../src/dygraph';
+import * as utils from '../../src/dygraph-utils';
 
-var origFunc = Dygraph.getContext;
+import Proxy from './Proxy';
+import CanvasAssertions from './CanvasAssertions';
 
-beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
-  Dygraph.getContext = function(canvas) {
-    return new Proxy(origFunc(canvas));
-  };
-});
+describe("step-plot-per-series", function() {
 
-afterEach(function() {
-  Dygraph.getContext = origFunc;
-});
+cleanupAfterEach();
+useProxyCanvas(utils, Proxy);
 
 it('testMixedModeStepAndLineFilled', function() {
   var opts = {