From f8ef2caa62536349bcf5ed79e880c061cd2496f9 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 7 Aug 2024 09:58:51 +0100 Subject: [PATCH] Bring back original assertion --- test/jsonista/core_test.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/jsonista/core_test.clj b/test/jsonista/core_test.clj index 1d652fe..5ac68a7 100644 --- a/test/jsonista/core_test.clj +++ b/test/jsonista/core_test.clj @@ -55,6 +55,9 @@ (testing ":pretty" (is (= "{\n \"hello\" : \"world\"\n}" (j/write-value-as-string data (j/object-mapper {:pretty true}))))) (testing ":strip-nils" + (let [data-with-nils {:hello "world" :goodbye nil}] + (is (= "{\"hello\":\"world\"}" (j/write-value-as-string data-with-nils (j/object-mapper {:strip-nils true})))))) + (testing ":strip-nils doesn't strip other empties" (let [data-with-nils {:hello "world" :goodbye nil :empty-string "" :empty-map {}}] (is (= "{\"hello\":\"world\",\"empty-string\":\"\",\"empty-map\":{}}" (j/write-value-as-string data-with-nils (j/object-mapper {:strip-nils true})))))) (testing ":escape-non-ascii"