私は Yesod を初めて使用し、保留中の仕様をwithApp
ブロック内に追加しようとしています (現時点では、Yesod の足場によって生成された仕様を変更しようとしています)。
コードは次のようになります。
appSpec :: Spec appSpec :: withApp $ do describe "getMyHandlerR" $ do it "todo" $ do pending
しかし、次のエラーメッセージが表示されました:
Couldn't match type ‘(App, wai-3.2.0:Network.Wai.Middleware)’
with ‘()’
Expected type: SpecWith (TestApp App)
Actual type: SpecWith (Arg Expectation)
In a stmt of a 'do' block: it "todo" $ do { pending }
In the second argument of ‘($)’, namely
‘do { it "todo" $ do { pending } }’
In a stmt of a 'do' block:
describe "upload a file without error"
$ do { it "todo" $ do { pending } }
withApp
すべてを削除すると動作します。withApp
予想されるタイプを何らかの形で変更していることは理解していますが、そうでないのに正しいタイプを持っているのdescribe
はなぜですか?it
pending