Skip to content

Commit

Permalink
Add test and upgrade elm-test version
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSStewart committed Jun 20, 2023
1 parent 78610c6 commit a200469
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"stil4m/structured-writer": "1.0.1 <= v < 2.0.0"
},
"test-dependencies": {
"elm-explorations/test": "1.0.0 <= v < 2.0.0"
"elm-explorations/test": "2.0.0 <= v < 3.0.0"
}
}
14 changes: 14 additions & 0 deletions tests/Elm/Parser/ExpressionTests.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Elm.Parser.ExpressionTests exposing (all)
import Elm.Parser.CombineTestUtil exposing (..)
import Elm.Parser.Declarations exposing (..)
import Elm.Syntax.Expression exposing (..)
import Elm.Syntax.Infix exposing (InfixDirection(..))
import Elm.Syntax.Node as Node exposing (Node(..))
import Elm.Syntax.Pattern exposing (..)
import Elm.Syntax.Range exposing (..)
Expand Down Expand Up @@ -33,6 +34,19 @@ all =
|> Maybe.map noRangeExpression
|> Maybe.map Node.value
|> Expect.equal (Just (TupledExpression [ Node emptyRange <| Integer 1, Node emptyRange <| Integer 2 ]))
, test "5-1" <|
\() ->
parseFullStringWithNullState "5-1" expression
|> Maybe.map Node.value
|> Expect.equal
(Just
(OperatorApplication
"-"
Left
(Node emptyRange (Integer 5))
(Node emptyRange (Integer 1))
)
)
, test "prefix expression" <|
\() ->
parseFullStringWithNullState "(,)" expression
Expand Down
2 changes: 1 addition & 1 deletion tests/Elm/Parser/WhitespaceTests.elm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Test exposing (..)

all : Test
all =
describe "LayoutTests"
describe "WhitespaceLayoutTests"
[ test "nSpaces - full" <|
\() ->
parseFullStringState emptyState " " (Whitespace.nSpaces 5)
Expand Down

0 comments on commit a200469

Please sign in to comment.