浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

EnvJS  page    

EnvJS is a simulated browser environment. It can be used for running FuncUnit 
unit tests. EnvJS can't be used for functional tests because it doesn't accurately implement event simulation.

Use

There is no installation step for EnvJS. It comes with JavaScriptMVC.

  1. Write a unit test
  2. Run the test
test("unit test", function(){
  var a = new Animal();
  a.setAge(2);
  equals(a.getAge(), 2, "age works");
})
./js funcunit/run envjs path/to/qunit.html

The same reporting system that is described in Integrations works with EnvJS.

posted on 2012-04-01 14:49  lexus  阅读(577)  评论(0编辑  收藏  举报