Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 23rd, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Resetting a KnockoutJS ViewModel in QUnit Tests
  2. module("foo", {
  3.     setup: function() {
  4.         this.model = instantiateModel();
  5.     },
  6.     tearDown: function() {
  7.         // execute reset here
  8.     });
  9.  
  10. test("bar", function() {
  11.     ok(this.model.hasSomething() !== null, "msg");
  12. });