// barchart-test.js
var tape = require('tape-catch'),
    jsdom = require('jsdom'),
    d3_svg = require('d3-svg'),
    bar_chart = require('../');

tape('bar chart is callable on a svg element', function(test) {
  var document = jsdom.jsdom();
  global.document = document;
  var svg = d3_svg.create('body');
  test.ok(svg, 'svg element exists');
  var chart = bar_chart.chart();

  test.doesNotThrow(function() {
    chart.data([]);
    svg.call(chart);
  });

  delete global.document;
  test.end();
});

@@ -218,28 +218,27 @@
 r do
-cument =
+m = new
  jsdom.
-jsdom
+JSDOM
 ();%0A
@@ -257,16 +257,27 @@
 ument = 
+dom.window.
 document

fix test