Skip to content

Commit 5f014eb

Browse files
fix: review comments
Signed-off-by: Shreyansh Shah <shreyansh_shah@yahoo.com>
1 parent effadea commit 5f014eb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

integrations/node-fetch/require.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Hook from "require-in-the-middle";
44
import { Headers, ResponseInit } from "node-fetch";
55
import mixin from "merge-descriptors";
6-
import { createExecutionContext,getExecutionContext } from "../../src/context";
6+
import { getExecutionContext } from "../../src/context";
77
import { Readable } from "stream";
88
import { ProcessDep, stringToBinary } from "../../src/util";
99
import { putMocks } from "../../mock/utils";
@@ -39,7 +39,7 @@ export function wrappedNodeFetch(fetch: any) {
3939
options: any
4040
) {
4141
if (process.env.KEPLOY_MODE == MODE_OFF) {
42-
createExecutionContext({ mode: MODE_OFF });
42+
return fetchFunc.apply(this, [url, options]);
4343
}
4444
if (
4545
getExecutionContext() == undefined ||
@@ -147,8 +147,6 @@ export function wrappedNodeFetch(fetch: any) {
147147
});
148148
resp = new fetch.Response(Readable.from(buf), rinit);
149149
break;
150-
case "off":
151-
return fetchFunc.apply(this, [url, options]);
152150
default:
153151
console.debug(
154152
"mode is not valid. Please set valid keploy mode using env variables"

0 commit comments

Comments
 (0)