You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by al...@apache.org on 2020/04/11 01:18:41 UTC

[openwhisk-wskdebug] 01/02: fix issue with cross-contamination of mock-require of debugger between wskdebug.test.js and ngrok.test.js

This is an automated email from the ASF dual-hosted git repository.

alexkli pushed a commit to branch fix-restore-bug
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdebug.git

commit c0be962ebac2055e954c0b042f7c2a6fe72f5e99
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Fri Apr 10 17:50:28 2020 -0700

    fix issue with cross-contamination of mock-require of debugger between wskdebug.test.js and ngrok.test.js
---
 test/wskdebug.test.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/wskdebug.test.js b/test/wskdebug.test.js
index 959168e..e988ad3 100644
--- a/test/wskdebug.test.js
+++ b/test/wskdebug.test.js
@@ -50,6 +50,11 @@ function mockDebugger() {
 
 describe('wskdebug cli', function() {
 
+    after(function() {
+        // stop mock otherwise bad effect on other tests
+        mockRequire.stop("../src/debugger");
+    })
+
     it("should print version (via wskdebug.js)", async function() {
         this.timeout(5000);
         const stdout = execSync("node wskdebug.js --version").toString();