@@ -90,3 +90,7 @@ generateJSSpec = describe "generateJS" $ do
90 parseFromString jsText `shouldSatisfy` isRight
90 parseFromString jsText `shouldSatisfy` isRight
91 jsText `shouldContain` "headerXWhatsForDinner"
91 jsText `shouldContain` "headerXWhatsForDinner"
92 jsText `shouldContain` "headers: { \"X-WhatsForDinner\": \"I would like \" + headerXWhatsForDinner + \" with a cherry on top.\" }\n"
92 jsText `shouldContain` "headers: { \"X-WhatsForDinner\": \"I would like \" + headerXWhatsForDinner + \" with a cherry on top.\" }\n"
94+ it "can generate the whole javascript code string at once with jsForAPI" $ do
95+ let jsStr = jsForAPI (Proxy :: Proxy TestAPI)
96+ parseFromString jsStr `shouldSatisfy` isRight