Skip to content

fix(sdk): defining function behavior in eval is not consistent with the original product#8155

Merged
filfreire merged 2 commits intodevelopfrom
fix/sdk/eval-behavior
Nov 7, 2024
Merged

fix(sdk): defining function behavior in eval is not consistent with the original product#8155
filfreire merged 2 commits intodevelopfrom
fix/sdk/eval-behavior

Conversation

@ihexxa
Copy link
Contributor

@ihexxa ihexxa commented Nov 7, 2024

Add ability for running eval() where it adds functions that can be then called later on from the same pre-request/after-response script the eval() first happened. (For feature parity with other API clients and Node.js itself)

Example:

const code = `
function get_some_string() {
  return 'aaaa';
}
`;

eval(code);

console.log(get_some_string()); 

Closes INS-4668

@ihexxa ihexxa changed the title fix(eval): defining function behavior in eval is not consistent with Postman fix(sdk): defining function behavior in eval is not consistent with Postman Nov 7, 2024
@filfreire filfreire force-pushed the fix/sdk/eval-behavior branch from 2275ec5 to 13d402e Compare November 7, 2024 09:56
@filfreire filfreire enabled auto-merge (squash) November 7, 2024 09:59
@ihexxa ihexxa changed the title fix(sdk): defining function behavior in eval is not consistent with Postman fix(sdk): defining function behavior in eval is not consistent with the original product Nov 7, 2024
@filfreire filfreire merged commit 3e10e4d into develop Nov 7, 2024
@filfreire filfreire deleted the fix/sdk/eval-behavior branch November 7, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants