【发布时间】:2015-04-22 18:16:12
【问题描述】:
我需要去一个特定的路由器来测试发布行为,我使用的是铁路由器包,Router.go('...'),但在服务器端不起作用,它给我一个错误:
//XXX this assumes no other routers on the parent stack which we should probably fix // 14
I20150220-18:47:00.749(-4)? router.dispatch(req.url, { // 15
I20150220-18:47:00.750(-4)? request: req, // 16
I20150220-18:47:00.750(-4)? response: res // 17
I20150220-18:47:00.750(-4)? }, next); // 18
I20150220-18:47:00.750(-4)? } has no method 'go'
I20150220-18:47:00.750(-4)? at packages/velocity:test-proxy/tests/mocha/server/publish/folders-publisher-tests.js:23:1
I20150220-18:47:00.750(-4)? at wrappedFunc (packages/mike:mocha/server.js:204:1)
I20150220-18:47:00.751(-4)? at runWithEnvironment (packages/mike:mocha/server.js:156:1)
我的路由器文件在 lib 中,我已经尝试在我的路由器控制器中调用一个方法,但也不起作用,有人知道它可能是什么吗????请
【问题讨论】:
标签: unit-testing meteor velocity publish-subscribe iron-router