Skip to content

Commit

Permalink
Bring back original assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicfreeston committed Aug 7, 2024
1 parent c8b12a8 commit f8ef2ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/jsonista/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f8ef2ca

Please sign in to comment.