From d19f759165d626d2cb7aaf56f4b2211bcec4fcc7 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Mon, 5 Apr 2021 12:26:16 -0500 Subject: [PATCH] combine interop tests --- tests/PlayerTest.elm | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/tests/PlayerTest.elm b/tests/PlayerTest.elm index db5ca50..8791e34 100644 --- a/tests/PlayerTest.elm +++ b/tests/PlayerTest.elm @@ -9,28 +9,26 @@ import Player exposing (Player) import Test exposing (..) -roundTripDecoderTest : Test -roundTripDecoderTest = - fuzz playerFuzzer "encode and decode are symmetrical" <| - \player -> - Player.encode player - |> Decode.decodeValue Player.decoder - |> Expect.equal (Ok player) - - -decoderTest : Test -decoderTest = - describe "decoder" - [ describe "id" - [ test "is OK with a missing ID" <| - \_ -> - Encode.object - [ ( "name", Encode.string "Test" ) - , ( "rating", Encode.int 1200 ) - , ( "matches", Encode.int 0 ) - ] - |> Decode.decodeValue Player.decoder - |> Expect.ok +interopTest : Test +interopTest = + describe "interop" + [ fuzz playerFuzzer "encode and decode are symmetrical" <| + \player -> + Player.encode player + |> Decode.decodeValue Player.decoder + |> Expect.equal (Ok player) + , describe "decoder" + [ describe "id" + [ test "is OK with a missing ID" <| + \_ -> + Encode.object + [ ( "name", Encode.string "Test" ) + , ( "rating", Encode.int 1200 ) + , ( "matches", Encode.int 0 ) + ] + |> Decode.decodeValue Player.decoder + |> Expect.ok + ] ] ]