我是 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