Moksi is an all-in-one JavaScript testing framework with a lot of salt, but easy on the pepper.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
examples
src Adds withArgument: arg as a shortcut for withArguments: [arg]. Jan 4, 2010
test Make default styling put more emphasis on failed tests. Jan 4, 2010
vendor Clean house and set up a new skeleton. Sep 2, 2009
.gitmodules
.kick
LICENSE
README.markdown
Rakefile
TODO

README.markdown

Moksi

Moksi is an all-in-one JavaScript testing framework with a lot of salt, but easy on the pepper. With Moksi you write tests which are terse and readable.

A taste

var Person = Class.create({
  initialize: function(name, mood) {
    this._name = name;
  },

  name: function() {
    return this._name;
  },

  toBlurb: function() {
    return this.name() + ' is a ' + mood + ' person.';
  }
});

Moksi.describe('Person', {
  setup: function() {
    this.suite.person = new Person('Alice', 'happy');
  },

  'describes itself in a blurb': function() {
    expects(this.suite.person.toBlurb()).equals('Alice is a happy person.');
  },

  'includes the name in the blurb': function() {
    expects(this.suite.person).receives('name', { times: 1 });
    this.suite.person.toBlurb();
  }
});

Copyright © 2009, Manfred Stienstra manfred@fngtps.com