on master help sign in
docs
c338551Mark Wotton
EXAMPLE.md+13−2
@@ -50,11 +50,22 @@ In the test file, we first define the tests: the faulty server should fail and t
50```haskell
50```haskell
51spec = describe "example" $ do
51spec = describe "example" $ do
52 it "good server should not fail" $ do
52 it "good server should not fail" $ do
53− fuzz @Api goodServer defaultConfig { coverageThreshold = 0.99 }
53+ fuzz @Api goodServer config
54 >>= (`shouldSatisfy` isNothing)
54 >>= (`shouldSatisfy` isNothing)
55 it "bad server should fail" $ do
55 it "bad server should fail" $ do
56− fuzz @Api badServer defaultConfig { coverageThreshold = 0.99 }
56+ fuzz @Api badServer config
57 >>= (`shouldSatisfy` serverFailure)
57 >>= (`shouldSatisfy` serverFailure)
58+
59+config = defaultConfig
60+ {
61+ -- we expect to be able to cover the api from our starting point:
62+ -- this will fail the test if we don't.
63+ coverageThreshold = 0.99
64+ }
65+
66+-- there are other tweakable things in the config, like maximum runtime, reps,
67+-- per-request healthchecks, and verbose logging. Have a look at
68+-- Roboservant.Types.Config for details.
58```
69```
59
70
60And unless we want to ship roboservant and all its dependencies to production, we also need
71And unless we want to ship roboservant and all its dependencies to production, we also need