From f30f28d7300fa15b3ef5a460e64656d53f690ff6 Mon Sep 17 00:00:00 2001 From: Flawid DSouza Date: Wed, 29 Jan 2025 10:18:35 +0530 Subject: [PATCH] test(ui): Import cURL removes trailing slash from URL --- packages/ui/src/parsers/curl.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/ui/src/parsers/curl.spec.ts b/packages/ui/src/parsers/curl.spec.ts index 4a6480d0..a03f2ca7 100644 --- a/packages/ui/src/parsers/curl.spec.ts +++ b/packages/ui/src/parsers/curl.spec.ts @@ -480,4 +480,15 @@ describe('curl', () => { }, ]) }) + + it('Trailing slash retention #307', () => { + const cmd1 = `curl https://httpbin.org/post/` + const result1 = convert(cmd1) + + const cmd2 = `curl https://httpbin.org/post` + const result2 = convert(cmd2) + + expect(result1).toHaveProperty('0.url', 'https://httpbin.org/post/') + expect(result2).toHaveProperty('0.url', 'https://httpbin.org/post') + }) })