From 8b76ecede3edc3839687732d968372263affa1e5 Mon Sep 17 00:00:00 2001 From: anusreesubash <65728079+anusreesubash@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:29:41 +0530 Subject: [PATCH] test: added test for self closing tags in xml-json parser (#2891) Co-authored-by: Anusree Subash --- .../echo xml parsed(self closing tags).bru | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 packages/bruno-tests/collection/echo/echo xml parsed(self closing tags).bru diff --git a/packages/bruno-tests/collection/echo/echo xml parsed(self closing tags).bru b/packages/bruno-tests/collection/echo/echo xml parsed(self closing tags).bru new file mode 100644 index 000000000..d337cebb3 --- /dev/null +++ b/packages/bruno-tests/collection/echo/echo xml parsed(self closing tags).bru @@ -0,0 +1,37 @@ +meta { + name: echo xml parsed(self closing tags) + type: http + seq: 6 +} + +post { + url: {{host}}/api/echo/xml-parsed + body: xml + auth: none +} + +body:xml { + + bruno + + +} + +assert { + res.status: eq 200 +} + +tests { + test("should return parsed xml", function() { + const data = res.getBody(); + expect(res.getBody()).to.eql({ + "hello": { + "world": [ + "bruno", + "" + ] + } + }); + }); + +}