Merge pull request #674 from danvk/module
[dygraphs.git] / auto_tests / tests / data_api.js
index 4b0ebe0..e692fc6 100644 (file)
@@ -3,12 +3,14 @@
  *
  * @author danvdk@gmail.com (Dan Vanderkam)
  */
+import Dygraph from '../../src/dygraph';
 describe("data-api", function() {
 
+cleanupAfterEach();
+
 var opts, graphDiv;
 
 beforeEach(function() {
-  document.body.innerHTML = "<div id='graph'></div>";
   opts = {
     width: 480,
     height: 320
@@ -17,9 +19,6 @@ beforeEach(function() {
   graphDiv = document.getElementById("graph");
 });
 
-afterEach(function() {
-});
-
 it('testBasicAccessors', function() {
   var g = new Dygraph(graphDiv, temperature_data, opts);