Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
seperated rinuts web service from the nodeunit driver. Now this pacak…
…ge consists of only the rinuts service which takes in a driver and exposes a RESTful api to display and activate the driver's tests
- Loading branch information
Showing
9 changed files
with
159 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var driver = function (tests) { | ||
this.init(tests); | ||
}; | ||
|
||
module.exports = driver; | ||
|
||
driver.prototype = { | ||
init: function (tests) { | ||
this.tests = tests; | ||
|
||
}, | ||
enumTests: function (callback) { | ||
var tests = [], | ||
key; | ||
|
||
console.log(this.tests.length); | ||
for (key in this.tests) { | ||
if (this.tests.hasOwnProperty(key)) { | ||
tests.push(this.tests[key].name); | ||
} | ||
} | ||
|
||
callback(null, tests); | ||
}, | ||
runTest: function (testName, callback, context) { | ||
var test = this.tests[testName], | ||
responseFormat = { | ||
name: testName, | ||
state: test.method() | ||
}; | ||
|
||
callback(null, responseFormat); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.