diff --git a/index.js b/index.js index 9bdb70e..f33abb6 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,7 @@ // make sourcemaps work! -require("source-map-support/register"); +if (process.env.NODE_ENV !== "test") { + require("source-map-support/register"); +} const debug = require("debug")("ganache"); diff --git a/lib/provider.js b/lib/provider.js index 8014fd3..94ba16c 100644 --- a/lib/provider.js +++ b/lib/provider.js @@ -1,5 +1,7 @@ // make sourcemaps work! -require("source-map-support/register"); +if (process.env.NODE_ENV !== "test") { + require("source-map-support/register"); +} let ProviderEngine = require("web3-provider-engine"); let SubscriptionSubprovider = require("web3-provider-engine/subproviders/subscriptions"); diff --git a/lib/server.js b/lib/server.js index 83bd172..e50dde1 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1,5 +1,7 @@ // make sourcemaps work! -require("source-map-support/register"); +if (process.env.NODE_ENV !== "test") { + require("source-map-support/register"); +} var Provider = require("./provider"); var webSocketServer = require("./webSocketServer"); diff --git a/public-exports.js b/public-exports.js index 5b2c85e..e13465b 100644 --- a/public-exports.js +++ b/public-exports.js @@ -1,5 +1,7 @@ // make sourcemaps work! -require("source-map-support/register"); +if (process.env.NODE_ENV !== "test") { + require("source-map-support/register"); +} const Provider = require("./lib/provider"); const Server = require("./lib/server");