Convert tests to use tape/istanbul/faucet
This commit is contained in:
parent
ee83d0e3ee
commit
3186f5eca1
|
@ -1,5 +1,6 @@
|
||||||
build
|
build
|
||||||
node_modules
|
node_modules
|
||||||
|
coverage
|
||||||
*.log
|
*.log
|
||||||
*.ldif
|
*.ldif
|
||||||
*.tar.*
|
*.tar.*
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -39,7 +39,7 @@ JSL_FILES_NODE = $(JS_FILES)
|
||||||
JSSTYLE_FILES = $(JS_FILES)
|
JSSTYLE_FILES = $(JS_FILES)
|
||||||
JSSTYLE_FLAGS = -f tools/jsstyle.conf
|
JSSTYLE_FLAGS = -f tools/jsstyle.conf
|
||||||
|
|
||||||
CLEAN_FILES += node_modules $(SHRINKWRAP) cscope.files
|
CLEAN_FILES += node_modules coverage $(SHRINKWRAP) cscope.files
|
||||||
|
|
||||||
include ./tools/mk/Makefile.defs
|
include ./tools/mk/Makefile.defs
|
||||||
|
|
||||||
|
@ -56,10 +56,11 @@ CLEAN_FILES += $(TAP) ./node_modules/tap
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: $(TAP)
|
test: $(TAP)
|
||||||
$(TAP) test/*.test.js
|
$(NPM) test
|
||||||
$(TAP) test/filters/*.test.js
|
|
||||||
$(TAP) test/controls/*.test.js
|
.PHONY: cover
|
||||||
$(TAP) test/messages/*.test.js
|
cover: test
|
||||||
|
$(NPM) run report
|
||||||
|
|
||||||
include ./tools/mk/Makefile.deps
|
include ./tools/mk/Makefile.deps
|
||||||
include ./tools/mk/Makefile.targ
|
include ./tools/mk/Makefile.targ
|
||||||
|
|
|
@ -39,10 +39,13 @@
|
||||||
"dtrace-provider": "0.2.8"
|
"dtrace-provider": "0.2.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tap": "0.4.1",
|
"node-uuid": "1.4.0",
|
||||||
"node-uuid": "1.4.0"
|
"faucet": "0.0.1",
|
||||||
|
"istanbul": "0.3.0",
|
||||||
|
"tape": "2.13.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./node_modules/.bin/tap ./test"
|
"report": "./node_modules/.bin/istanbul report html && open ./coverage/lcov-report/index.html",
|
||||||
|
"test": "./node_modules/.bin/istanbul cover --print none test/test.js | ./node_modules/.bin/faucet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
var Logger = require('bunyan');
|
var Logger = require('bunyan');
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
var uuid = require('node-uuid');
|
var uuid = require('node-uuid');
|
||||||
var vasync = require('vasync');
|
var vasync = require('vasync');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
|
|
||||||
///--- Globals
|
///--- Globals
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var parse = require('../../lib/index').parseFilter;
|
var parse = require('../../lib/index').parseFilter;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
var uuid = require('node-uuid');
|
var uuid = require('node-uuid');
|
||||||
|
|
||||||
var ldap = require('../lib/index');
|
var ldap = require('../lib/index');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
var Logger = require('bunyan');
|
var Logger = require('bunyan');
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
|
|
||||||
///--- Globals
|
///--- Globals
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
var asn1 = require('asn1');
|
var asn1 = require('asn1');
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
var Logger = require('bunyan');
|
var Logger = require('bunyan');
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
var uuid = require('node-uuid');
|
var uuid = require('node-uuid');
|
||||||
var vasync = require('vasync');
|
var vasync = require('vasync');
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright 2014 Mark Cavage. All rights reserved.
|
||||||
|
|
||||||
|
var assert = require('assert');
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
|
|
||||||
|
function runTests(directory) {
|
||||||
|
fs.readdir(directory, function (err, files) {
|
||||||
|
assert.ifError(err);
|
||||||
|
|
||||||
|
console.dir(files);
|
||||||
|
files.filter(function (f) {
|
||||||
|
return (/\.test\.js$/.test(f));
|
||||||
|
}).map(function (f) {
|
||||||
|
return (path.join(directory, f));
|
||||||
|
}).forEach(require);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
///--- Run All Tests
|
||||||
|
|
||||||
|
(function main() {
|
||||||
|
runTests(__dirname);
|
||||||
|
runTests(path.join(__dirname, 'controls'));
|
||||||
|
runTests(path.join(__dirname, 'filters'));
|
||||||
|
runTests(path.join(__dirname, 'messages'));
|
||||||
|
})();
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
|
||||||
|
|
||||||
var test = require('tap').test;
|
var test = require('tape').test;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue