Skip to content

Commit 44fc70a

Browse files
sabiwaramichalmuskala
authored andcommitted
Fix non-deterministic test on OTP27 (#187)
1 parent 9c3bc4b commit 44fc70a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/encode_test.exs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@ defmodule Jason.EncoderTest do
219219
end
220220

221221
test "pretty: true" do
222-
assert to_json(%{a: 3.14159, b: 1}, pretty: true) == ~s|{\n "a": 3.14159,\n "b": 1\n}|
222+
object = Jason.OrderedObject.new(a: 3.14159, b: 1)
223+
assert to_json(object, pretty: true) == ~s|{\n "a": 3.14159,\n "b": 1\n}|
223224
end
224225

225226
test "pretty: false" do
226-
assert to_json(%{a: 3.14159, b: 1}, pretty: false) == ~s|{"a":3.14159,"b":1}|
227+
object = Jason.OrderedObject.new(a: 3.14159, b: 1)
228+
assert to_json(object, pretty: false) == ~s|{"a":3.14159,"b":1}|
227229
end
228230

229231
defp to_json(value, opts \\ []) do

0 commit comments

Comments
 (0)