Skip to content

Commit

Permalink
test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand committed Sep 14, 2023
1 parent bd04a88 commit c889db2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const blockLocalhostRequests = (url) => {
throw new Error('blocked host requests are not allowed');
}
} catch (error) {
throw new Error(`invalid url ${url} :: ${error.message}`);
throw new Error(`invalid url, ${error.message}`);
}
};

Expand Down
7 changes: 3 additions & 4 deletions test/__tests__/user_transformation_fetch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ jest.mock("dns", () => {
promises: {
Resolver: function() {
return {
resolve: mockResolver,
setServers: () => {},
resolve4: mockResolver,
};
}
}
Expand Down Expand Up @@ -121,7 +120,7 @@ describe("User transformation fetch tests", () => {
}
`
};
const errMsg = "localhost requests are not allowed";
const errMsg = "invalid url, localhost requests are not allowed";

const output = await userTransformHandler(inputData, versionId, [], trRevCode, true);

Expand Down Expand Up @@ -278,7 +277,7 @@ describe("User transformation fetch tests", () => {
}
`
};
const errMsg = "localhost requests are not allowed";
const errMsg = "invalid url, localhost requests are not allowed";

const output = await userTransformHandler(inputData, versionId, [], trRevCode, true);

Expand Down

0 comments on commit c889db2

Please sign in to comment.