Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-06-25 17:14:40 +0300
committerGar <gar+gh@danger.computer>2021-06-25 19:32:05 +0300
commit013f0262db3e16605820f6117749fd3ebc70f6d1 (patch)
treeb7924d58a0fc29ebdc9e3aa03bacae25e666f205 /test/lib/utils/exit-handler.js
parentcf55fe0f06a1e50454b5c2bcf40652cb6fb68e53 (diff)
fix(exitHandler): write code to logfile
This moves the logging of the exit code to before the logfile is written, when the exit handler was not called. This will ensure that the code shows up in the debug logs. PR-URL: https://github.com/npm/cli/pull/3469 Credit: @wraithgar Close: #3469 Reviewed-by: @isaacs
Diffstat (limited to 'test/lib/utils/exit-handler.js')
-rw-r--r--test/lib/utils/exit-handler.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lib/utils/exit-handler.js b/test/lib/utils/exit-handler.js
index 72f94bfde..06014b67a 100644
--- a/test/lib/utils/exit-handler.js
+++ b/test/lib/utils/exit-handler.js
@@ -109,6 +109,10 @@ process = Object.assign(
// in order for tap to exit properly
t.teardown(() => {
process = _process
+})
+
+t.afterEach(() => {
+ // clear out the 'A complete log' message
npmlog.record.length = 0
})