Skip to content

Commit

Permalink
test(ui): Import cURL removes trailing slash from URL
Browse files Browse the repository at this point in the history
  • Loading branch information
flawiddsouza committed Jan 29, 2025
1 parent cbda62c commit f30f28d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/ui/src/parsers/curl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})

0 comments on commit f30f28d

Please sign in to comment.