mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
88af86e21a
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7046 GitOrigin-RevId: 6a3f4780cfd86646bfdd933839ca0dfb865fd32c
19 lines
466 B
Plaintext
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
|