@@ -13,6 +13,7 @@ import qualified Headers
1313import qualified Post
1414import qualified Product
1515import qualified Breakdown
16+import qualified Nested
1617
1718import Test.Hspec.Core.Spec(ResultStatus(Failure,Success),resultStatus,itemExample,FailureReason(Reason),mapSpecItem_)
1819import Data.Dynamic(toDyn)
@@ -91,6 +92,14 @@ spec = do
9192 RS.fuzz @Breakdown.SumApi Breakdown.sumServer defaultConfig noCheck
9293 >>= (`shouldSatisfy` serverFailure)
9394
95+ describe "flattening" $ do
96+ -- | we don't actually do much here, this is just here to document the appropriate response
97+ -- if you get a type error with a nested api.
98+ it "can handle nested apis" $ do
99+ RS.fuzz @(Nested.FlatApi) Nested.server defaultConfig { RS.coverageThreshold = 0.99 } noCheck
100+ >>= (`shouldSatisfy` isNothing)
101+
102+
94103
95104serverFailure :: Maybe RS.Report -> Bool
96105serverFailure = \case