• page

EnvJS funcunit.envjs

 

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/open/envjs path/to/qunit.html

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