Travis build: 1297 [cron]
This commit is contained in:
15
test/hashNode/hashNode.js
Normal file
15
test/hashNode/hashNode.js
Normal file
@ -0,0 +1,15 @@
|
||||
const crypto = require('crypto');
|
||||
const hashNode = val =>
|
||||
new Promise(resolve =>
|
||||
setTimeout(
|
||||
() =>
|
||||
resolve(
|
||||
crypto
|
||||
.createHash('sha256')
|
||||
.update(val)
|
||||
.digest('hex')
|
||||
),
|
||||
0
|
||||
)
|
||||
);
|
||||
module.exports = hashNode
|
||||
13
test/hashNode/hashNode.test.js
Normal file
13
test/hashNode/hashNode.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const hashNode = require('./hashNode.js');
|
||||
|
||||
test('Testing hashNode', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof hashNode === 'function', 'hashNode is a Function');
|
||||
//t.deepEqual(hashNode(args..), 'Expected');
|
||||
//t.equal(hashNode(args..), 'Expected');
|
||||
//t.false(hashNode(args..), 'Expected');
|
||||
//t.throws(hashNode(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user