Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfpleite committed Jul 28, 2024
1 parent b23f3cf commit ee2fcbc
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions tests/Install/FieldInTypeAliasTest.elm
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ all =
test1 =
{ description = "should not report an error when the field already exists"
, src = """module Client exposing (..)
type alias Client =
{ name : String
, age : Int
}
"""
}"""
, installation =
Install.FieldInTypeAlias.config "Client" "Client" [ "name : String" ]
|> Install.insertFieldInTypeAlias
Expand All @@ -33,22 +33,22 @@ type alias Client =
test2 =
{ description = "should report an error when the field does not exist"
, src = """module Client exposing (..)
type alias Client =
{ age : Int
}
"""
}"""
, installation =
Install.FieldInTypeAlias.config "Client" "Client" [ "name : String" ]
|> Install.insertFieldInTypeAlias
, under = """type alias Client =
{ age : Int
}"""
, fixed = """module Client exposing (..)
type alias Client =
{ age : Int
, name : String
}
"""
}"""
, message = "Add name to Client"
}

Expand All @@ -58,8 +58,7 @@ test3 =
, src = """module Data.Client exposing (..)
type alias Client =
{ age : Int
}
"""
}"""
, installation =
Install.FieldInTypeAlias.config "Data.Client" "Client" [ "name : String" ]
|> Install.insertFieldInTypeAlias
Expand All @@ -70,8 +69,7 @@ type alias Client =
type alias Client =
{ age : Int
, name : String
}
"""
}"""
, message = "Add name to Client"
}

Expand All @@ -85,8 +83,7 @@ test4 =
, src = """module Client exposing (..)
type alias Client =
{ age : Int
}
"""
}"""
, installation =
Install.FieldInTypeAlias.config "Client" "Client" [ "name : String", "email : String", "age : Int", "lastName : String", "favoriteColor : String" ]
|> Install.insertFieldInTypeAlias
Expand All @@ -100,7 +97,6 @@ type alias Client =
, email : String
, lastName : String
, favoriteColor : String
}
"""
}"""
, message = "Add fields email, favoriteColor, lastName, name to Client"
}

0 comments on commit ee2fcbc

Please sign in to comment.