diff --git a/src/Json.ml b/src/Json.ml index b326ee7..a654a7d 100644 --- a/src/Json.ml +++ b/src/Json.ml @@ -49,7 +49,7 @@ module Of_json = struct if String.length s = 1 then String.get s 0 else of_json_error - ("Expected a single-character string, got " + ("Expected single-character string, got " ^ Js.Json.stringify json) else of_json_error "expected a string" diff --git a/src/__tests__/Json_decode_test.ml b/src/__tests__/Json_decode_test.ml index b382084..649dd4a 100644 --- a/src/__tests__/Json_decode_test.ml +++ b/src/__tests__/Json_decode_test.ml @@ -118,7 +118,7 @@ let () = fail "should throw" with | Of_json_error - (Json_error "Expected a single-character string, got \"\"") + (Json_error "Expected single-character string, got \"\"") -> pass); @@ -128,8 +128,7 @@ let () = fail "should throw" with | Of_json_error - (Json_error - "Expected a single-character string, got \"abc\"") + (Json_error "Expected single-character string, got \"abc\"") -> pass);