Skip to content

Commit

Permalink
chore: add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pregnantboy committed Dec 23, 2024
1 parent 3ab7129 commit d05f751
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,19 @@ describe('make http request', () => {
},
)
})

describe('escaping variables should maintain original type', () => {
it.each([
[true, true],
[false, false],
['true', 'true'],
[123, 123],
['string with "quotes" inside', 'string with \\"quotes\\" inside'],
['string without quotes', 'string without quotes'],
['{string with braces}', '{string with braces}'],
])('should escape variables', (input, expected) => {
const escaped = makeRequestAction.preprocessVariable('data', input)
expect(escaped).toBe(expected)
})
})
})

0 comments on commit d05f751

Please sign in to comment.