From b5168c1070c91708cd370910270f5291eb3697e3 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 27 Sep 2017 10:39:03 -0400 Subject: [PATCH] Restore the global d3 (needed so tests use the same d3.event as iD?) --- modules/index.js | 4 +++- test/index.html | 2 +- test/spec/spec_helpers.js | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/index.js b/modules/index.js index 95a71a973..981a047db 100644 --- a/modules/index.js +++ b/modules/index.js @@ -1,3 +1,5 @@ +import * as d3 from 'd3'; // TODO: remove (needed for tests?) + export * from './actions/index'; export * from './behavior/index'; export * from './core/index'; @@ -43,4 +45,4 @@ export var debug = false; import * as lib from './lib/index'; -export { lib }; +export { lib, d3 }; diff --git a/test/index.html b/test/index.html index 4d6a2b13e..4d4ca1b70 100644 --- a/test/index.html +++ b/test/index.html @@ -5,7 +5,7 @@ Mocha Tests - +
diff --git a/test/spec/spec_helpers.js b/test/spec/spec_helpers.js index de571a149..c67bbe06f 100644 --- a/test/spec/spec_helpers.js +++ b/test/spec/spec_helpers.js @@ -20,3 +20,5 @@ mocha.setup({ }); expect = chai.expect; + +window.d3 = iD.d3; // TODO: remove