Created: 2011-07-07 16:34
Updated: 2014-09-23 10:57

README.md

j

j is a testing library written in 5 lines of code (or 376 characters) which tries to be performant, with eye-catchy reports and easy to use.

This library is a shameless copy of txus famous a. But smaller.

In order to contribute to j, you have to bear in mind that the code must stay under 5 lines and with less than 80 chars per line.

Usage

RSpec? Cucumber? Vows? Expresso?

F**k, life is too short! Let's use j!!

var test = j();

test([
  function setup() {
    this.user = {some: 'object'};
  }
, function test_user_has_property(assert) {
    assert(this.user.some === 'object');
    assert(!this.user.other);
  }
, function teardown() {
    this.user = null;
  }
]);

test([
  function setup() {
    this.foo = [1, 2, 3];
  }
, function test_user_has_property(assert) {
    assert(this.foo.length === 3);
    assert(this.foo[2] > 934); // Should fail at line 27

    this.foo[1] = 99;

    assert(this.foo[1] !== 2);
  }
, function teardown() {
    this.bar = 'something';
  }
]);

test();
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more