From 03e5cd350d09243083a984f99e920b8f4992791e Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 5 Apr 2018 14:17:30 +0200 Subject: [PATCH] async stack traces: NODE_ENV=dev -> NODE_DEBUG=hafas-client --- lib/request.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request.js b/lib/request.js index 96d5da5f..aaca1558 100644 --- a/lib/request.js +++ b/lib/request.js @@ -2,7 +2,7 @@ const crypto = require('crypto') let captureStackTrace = () => {} -if (process.env.NODE_ENV === 'dev') { +if (process.env.NODE_DEBUG === 'hafas-client') { captureStackTrace = require('capture-stack-trace') } const {stringify} = require('query-string') diff --git a/package.json b/package.json index 90938153..9c305030 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "vbb-stations-autocomplete": "^3.1.0" }, "scripts": { - "test": "env NODE_ENV=dev node test/index.js", + "test": "env NODE_ENV=dev NODE_DEBUG=hafas-client node test/index.js", "prepublishOnly": "npm test | tap-spec" } }