github.com/simpleiot/simpleiot@v0.18.3/frontend/tests/Point.elm (about) 1 module Point exposing (all) 2 3 import Api.Point as Point exposing (Point) 4 import Expect 5 import Test exposing (..) 6 import Time 7 8 9 all : Test 10 all = 11 describe "Point tests" 12 [ test "getTextArray" <| 13 \_ -> 14 let 15 tzero = 16 Time.millisToPosix 0 17 18 pts = 19 [ Point "a" "0" tzero 0 "111" 0 20 , Point "b" "0" tzero 0 "444" 0 21 , Point "a" "2" tzero 0 "333" 0 22 , Point "a" "1" tzero 0 "222" 0 23 , Point "a" "3" tzero 0 "555" 1 24 , Point "a" "10" tzero 0 "444" 0 25 ] 26 in 27 Expect.equal (Point.getTextArray pts "a") [ "111", "222", "333", "444" ] 28 ]