mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 13:02:11 +03:00
354ab2f7aa
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7133 GitOrigin-RevId: 625dde70d1c594dcdfd377efac78710174a74efc
18 lines
654 B
Haskell
18 lines
654 B
Haskell
module Test.TestHelpers
|
|
( AgentTestSpec,
|
|
it,
|
|
)
|
|
where
|
|
|
|
import Control.Monad.Free (Free)
|
|
import GHC.Stack (HasCallStack)
|
|
import Test.AgentClient (AgentClientT, HasAgentClient, runAgentClientT)
|
|
import Test.Sandwich (ExampleT, HasBaseContext, SpecFree)
|
|
import Test.Sandwich qualified as Sandwich
|
|
import Test.Sandwich.Internal (SpecCommand)
|
|
|
|
type AgentTestSpec = forall context. (HasBaseContext context, HasAgentClient context) => SpecFree context IO ()
|
|
|
|
it :: (HasCallStack, HasAgentClient context, Monad m) => String -> AgentClientT (ExampleT context m) () -> Free (SpecCommand context m) ()
|
|
it label test = Sandwich.it label $ runAgentClientT test
|