Skip to content

Commit

Permalink
fix: pm.response.text() is not converted
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Oct 11, 2024
1 parent 25f554a commit 330c291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ui/src/helpers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ describe('scriptConversion', () => {
pm.response.json();
pm.response.code;
pm.test("Test", function () {});
pm.response.text();
`

const expectedRestfoxScript = `
Expand All @@ -435,6 +436,7 @@ describe('scriptConversion', () => {
rf.response.getBodyJSON();
rf.response.getStatusCode();
test("Test", function () {});
rf.response.getBodyText();
`

const result = scriptConversion(postmanScript, 'postmanToRestfox')
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ export function scriptConversion(scriptToConvert: string, scriptType: 'postmanTo
'pm.response.code': 'rf.response.getStatusCode()',
'pm.test': 'test',
'pm.expect': 'expect',
'pm.response.text()': 'rf.response.getBodyText()'
},
restfoxToPostman: {
'rf.setEnvVar': 'pm.environment.set',
Expand Down

0 comments on commit 330c291

Please sign in to comment.