github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/tests/DragTests.elm (about) 1 module DragTests exposing (all) 2 3 import Dashboard.Drag as Drag 4 import Expect 5 import Test exposing (Test, describe, test) 6 7 8 all : Test 9 all = 10 describe "drag" 11 [ test "forwards" <| 12 \_ -> 13 Drag.drag 0 2 [ "a", "b" ] 14 |> Expect.equal [ "b", "a" ] 15 , test "forwards from the middle" <| 16 \_ -> 17 Drag.drag 1 4 [ "a", "b", "c" ] 18 |> Expect.equal [ "a", "c", "b" ] 19 , test "backwards" <| 20 \_ -> 21 Drag.drag 1 0 [ "a", "b" ] 22 |> Expect.equal [ "b", "a" ] 23 ]