首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > JavaScript > JavaScript模拟工具RSpec的风格。

JavaScript模拟工具RSpec的风格。

  • 资源大小:10.13 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: javascript rspec unittest Mock jsmock

资 源 简 介

Move to github https://github.com/mixed/jsmocktool Javascript Mock Tool is Mock library of RSpec style. Easy use Mock or Stub object! 20110626 mock object(verify, verify_all, reset, reset_all) the methods added. ``` mock("Foo.Bar").shouldreceive("test").withparam(1,2).and_return("2"); Foo.Bar.test(1,2); mock("Foo.Bar").verify("test"); -> {"total":1,"[1,2]":1}; //If you call the method call returns, unless obj throw error. mock("Foo.Bar").clear("test"); -> {"total":0}; //Is initialized to the information you"ve call. ``` 20090616 namespace bug fix. mock("Foo.Bar").should_receive("test").with_param(1,2).and_return("2");=>Foo.Bar.test(1,2); -> 2 20090615 Mock.anything() method add. mock("Foo").should_receiv
VIP VIP
0.178028s