Skip to content

Commit

Permalink
Update automatic tests to use the new backend main declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Aug 24, 2021
1 parent 7868790 commit c6c6d23
Showing 1 changed file with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,25 @@ state_type_name_from_root_elm_module =
, interfaceToHost_processEvent
)
type alias State = {}
type alias State = { field_name : Int }
interfaceToHost_processEvent : String -> State -> ( State, String )
interfaceToHost_processEvent =
InterfaceToHost.wrapForSerialInterface_processEvent processEvent
backendMain : ElmFullstack.BackendConfig State
backendMain =
{ init = ( {}, [] )
, subscriptions = subscriptions
}
subscriptions : State -> ElmFullstack.BackendSubs State
subscriptions _ =
{ httpRequest = always (\\s -> ( s, [] ))
, posixTimeIsPast = Nothing
}
"""
, Ok
( CompileFullstackApp.RecordElmType { fields = [] }
( CompileFullstackApp.RecordElmType
{ fields = [ ( "field_name", CompileFullstackApp.LeafElmType CompileFullstackApp.IntLeaf ) ] }
, Dict.empty
)
)
Expand Down Expand Up @@ -164,7 +175,6 @@ interfaceToHost_processEvent =
CompileFullstackApp.parseAppStateElmTypeAndDependenciesRecursively
sourceModules
( moduleFilePath, parsedModule )
|> Result.map Tuple.second
|> Expect.equal expectedResult
)
|> Result.Extra.unpack Expect.fail identity
Expand Down

0 comments on commit c6c6d23

Please sign in to comment.