0.1.0 • Published 9 years ago

simpletestjs v0.1.0

Weekly downloads
28
License
-
Repository
github
Last release
9 years ago

SimpleTestJS

Write your tests like this.

SimpleTest.suite("Test Suite 1", function (test) {

  test.beforeEveryTest(function (done) {
    setTimeout(function () {
      done();
    }, 1000);
  });

  test.it("should work", function (assert) {
    setTimeout(function () {
      assert("nooooo", true);
    }, 6000);
  });

  test.it("should not work", function (assert) {
    assert("the value is false", false);
  });

  test.afterAllTests(function (done) {
    console.log("cleanup");
    done();
  });

}, { timeout: 1000 });

SimpleTest.suite("Test Suite 2", function (test) {

  test.beforeEveryTest(function (done) {
    //setTimeout(function () {
    done();
    //}, 1000);
  });

  test.it("should work", function (assert) {
    assert("nooooo", true);
  });

  test.it("should not work", function (assert) {
    assert("the value is false", false);
  });

});

//run it like this
SimpleTest.run();
0.1.0

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago