Adapter for the tape testing framework.
$ npm install karma-tape --save-dev
// karma.conf.js
module.exports = function(config) {
config.set({
frameworks: ['tape'],
files: [
'src/*.js',
'test/*.js'
],
reporters: ['spec'],
})
}
just write your tests without requiring tape
// var test = require('tape'); // no need to require tape
test('timing test', function (t) {
t.plan(2);
t.equal(typeof Date.now, 'function');
var start = Date.now();
setTimeout(function () {
t.equal(Date.now() - start, 100);
}, 100);
});
For more information on Karma see the homepage.