{-# LANGUAGE OverloadedStrings #-} import Network.Wai.Handler.Launch (insideHead) import Test.Hspec import Test.Hspec.HUnit import Data.Enumerator hiding (map) import Test.HUnit import qualified Data.ByteString as S main :: IO () main = hspec $ describe "insideHead" [ it "handles single chunks" $ helper "bar
foobaz" ["barbaz"] , it "handles single chunks, no " $ helper "barfoo" ["bar"] , it "handles whole chunks" $ helper "barfoobaz" ["bar", "", "baz"] , it "handles split chunks" $ helper "barfoobaz" ["bar", "