![]() |
1
1
从上面评论中的@Troopers链接来看,这似乎是不可能的: Doing this is not technically possible without faking the entire module loading system.
因此,我遵循了以下建议:
https://github.com/request/request/issues/2181
并使用mock require来存根
|
![]() |
2
0
您可能会发现Sinon HowTo about Link Seams很有帮助: http://sinonjs.org/how-to/link-seams-commonjs/ |
![]() |
brcebn · lib+初始值设定项上的Rspec 7 年前 |
![]() |
kenji · 如何使用来自外部服务的验证来存根模型 7 年前 |
![]() |
Alessandro Argentieri · Junit无法模拟类 7 年前 |
![]() |
joshweir Raveena · RSpec存根循环中的相同方法 7 年前 |
![]() |
user3066571 · 尝试安装多窗口功能时Chefspec不工作 8 年前 |
![]() |
user970500 · 添加安全标头 9 年前 |
![]() |
Camden Narzt · 我怎样才能在最短的时间内完成任务? 9 年前 |