test(toJson): add extra test cases for new `pretty` behaviour