Skip to content

Commit

Permalink
fix: review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shreyansh Shah <[email protected]>
  • Loading branch information
shreyanshshah27 committed Mar 9, 2023
1 parent effadea commit 5f014eb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions integrations/node-fetch/require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Hook from "require-in-the-middle";
import { Headers, ResponseInit } from "node-fetch";
import mixin from "merge-descriptors";
import { createExecutionContext,getExecutionContext } from "../../src/context";
import { getExecutionContext } from "../../src/context";
import { Readable } from "stream";
import { ProcessDep, stringToBinary } from "../../src/util";
import { putMocks } from "../../mock/utils";
Expand Down Expand Up @@ -39,7 +39,7 @@ export function wrappedNodeFetch(fetch: any) {
options: any
) {
if (process.env.KEPLOY_MODE == MODE_OFF) {
createExecutionContext({ mode: MODE_OFF });
return fetchFunc.apply(this, [url, options]);
}
if (
getExecutionContext() == undefined ||
Expand Down Expand Up @@ -147,8 +147,6 @@ export function wrappedNodeFetch(fetch: any) {
});
resp = new fetch.Response(Readable.from(buf), rinit);
break;
case "off":
return fetchFunc.apply(this, [url, options]);
default:
console.debug(
"mode is not valid. Please set valid keploy mode using env variables"
Expand Down

0 comments on commit 5f014eb

Please sign in to comment.