Travis build: 1953 [cron]

This commit is contained in:
30secondsofcode
2018-04-12 20:52:50 +00:00
parent 07fc5cd355
commit b6b0e391f7
6 changed files with 108 additions and 351 deletions

6
test/hz/hz.js Normal file
View File

@ -0,0 +1,6 @@
const hz = (fn, iterations = 100) => {
const before = performance.now();
for (let i = 0; i < iterations; i++) fn();
return 1000 * iterations / (performance.now() - before);
};
module.exports = hz;

13
test/hz/hz.test.js Normal file
View File

@ -0,0 +1,13 @@
const test = require('tape');
const hz = require('./hz.js');
test('Testing hz', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof hz === 'function', 'hz is a Function');
//t.deepEqual(hz(args..), 'Expected');
//t.equal(hz(args..), 'Expected');
//t.false(hz(args..), 'Expected');
//t.throws(hz(args..), 'Expected');
t.end();
});