Skip to content

Commit 0513a03

Browse files
committed
Shuffle fields order in JSON test
1 parent c52ee25 commit 0513a03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/test/elixir/json_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ defmodule JSONTest do
112112
describe "deriving" do
113113
defmodule WithOnly do
114114
@derive {JSON.Encoder, only: [:a, :b, :d]}
115-
defstruct [:a, :b, :c, :d]
115+
# The encoded order depends on only
116+
defstruct Enum.shuffle([:a, :b, :c, :d])
116117
end
117118

118119
test "with only" do

0 commit comments

Comments
 (0)