dwf/rva: adding a little bit of suite-ness to make async testing more readable.

This commit is contained in:
pivotal
2008-12-01 16:32:14 -08:00
parent 29a0e1f519
commit 7a95f3344c
3 changed files with 117 additions and 69 deletions

View File

@@ -83,7 +83,8 @@ var it = function (description) {
description: description,
queue: [],
currentTimeout: 0,
done: false,
finished: false,
suite: {next:function() {}},
results: [],
expects_that: function (actual) {
@@ -100,7 +101,7 @@ var it = function (description) {
},
finish: function() {
that.done = true;
that.finished = true;
},
execute: function () {
@@ -150,8 +151,8 @@ var Jasmine = jasmine_init();
/*
* TODO:
* - add spec or description to results
* - spec.execute needs to wait until the spec is done
* - an async test will be killed after X ms if not done and then listed as failed with an "async fail" message of some sort
//* - spec.execute needs to wait until the spec is done
//* - an async test will be killed after X ms if not done and then listed as failed with an "async fail" message of some sort
* - Suite to run tests in order, constructed with a function called describe
* - Suite supports before
* - Suite supports after