Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[tap] added support for node tap

  • Loading branch information...
commit 76b4dc00b499a3318591b1eb8abeebebd9b190eb 1 parent 5e20e53
@dscape authored
Showing with 22 additions and 2 deletions.
  1. +20 −0 engines/tap.js
  2. +1 −1  package.json
  3. +1 −1  test/use.js
View
20 engines/tap.js
@@ -0,0 +1,20 @@
+var _ = require('underscore')
+ , tap = require('tap')
+ , test = tap.test
+ , plan = tap.plan
+ ;
+
+module.exports = exports = function(name,tests,module,selected) {
+ var f, ok, test_names, total;
+ if(selected) { test_names = selected.split(','); }
+ else { test_names =
+ _.filter(_.keys(tests), function(e) { return e.indexOf('_ok') === -1; });
+ }
+ total = test_names.length;
+ test(name, function (t) {
+ t.plan(total);
+ test_names.forEach(function(name) {
+ tests[name](tests[name+'_ok'](t));
+ });
+ });
+};
View
2  package.json
@@ -7,7 +7,7 @@
, "keywords": ["vows", "testing"]
, "dependencies":
{ "vows": "~0.5.10"
- , "node-tap": "0.0.9"
+ , "tap": "0.0.9"
, "underscore": "~1.1.7"
}
, "scripts": { "test": "./test/run" }
View
2  test/use.js
@@ -6,4 +6,4 @@ var ensure = require('../ensure').use('vows')
tests.vows = function (cb) { cb(true); };
tests.vows_ok = function (t) { assert.ok(t); };
-ensure((__filename + '_vows'),tests,module);
+ensure((__filename + '_use'),tests,module);
Please sign in to comment.
Something went wrong with that request. Please try again.