title: Is there framework like Junit for Javascript to test object oriented javascript in Node.js?
body: <p>Are there any best pratices for testing object oriented javascript in Node.js?</p>
  
  <p>Like for example if I had the following Cat.js class:</p>
  
  <pre><code>function Cat(age, name) {
      this.name = name || null;
      this.age = age || null;
  }
  
  Cat.prototype.getAge = function() {
      return this.age;
  }
  
  Cat.prototype.setAge = function(age) {
      this.age = age;
  }
  
  Cat.prototype.getName = function(name) {
      return this.name;
  }
  
  Cat.prototype.setName = function(name) {
      this.name = name;
  }
  
  Cat.prototype.equals = function(otherCat) {
      return otherCat.getName() === this.getName()
          &amp;&amp; otherCat.getAge() === this.getAge();
  }
  
  Cat.prototype.fill = function(newFields) {
      for (var field in newFields) {
          if (this.hasOwnProperty(field) &amp;&amp; newFields.hasOwnProperty(field)) {
              if (this[field] !== 'undefined') {
                  this[field] = newFields[field];
              }
          }
      }
  };
  
  module.exports = Cat;
  </code></pre>
  
  <p>and I wanted to write test classes that look something like the following like Java's junit tests:</p>
  
  <pre><code>var cat1;
  
  setUp() {
      cat1 = new Cat(10, 'Tom');
  }
  </code></pre>