graphql-engine/server/lib/api-tests/ghci/fixtureRepl.ghci
Philip Lykke Carlsen 88af86e21a server/tests: Add ghci macros to ease working with fixtureRepl
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7046
GitOrigin-RevId: 6a3f4780cfd86646bfdd933839ca0dfb865fd32c
2022-11-25 12:34:37 +00:00

19 lines
466 B
Plaintext

import Data.List
:{
fixtureReplMacro :: String -> IO String
fixtureReplMacro module_ = do
return $ unlines
[ "import Harness.Test.Fixture",
"import Harness.Logging",
":m + *SpecHook *" ++ module_,
"logger = Logger mempty",
"mode <- setupTestingMode",
"te <- setupTestEnvironment mode logger",
"te",
"putStrLn \"Now do: \\\"cleanup <- fixtureRepl <fixture name> te\\\"\""
]
:}
:def fixtureRepl fixtureReplMacro