Test and fix for hashNode
This commit is contained in:
@ -22,5 +22,5 @@ const hashNode = val =>
|
|||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
hashBrowser(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(console.log); // '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393'
|
hashNode(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(console.log); // '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393'
|
||||||
```
|
```
|
||||||
|
|||||||
@ -5,9 +5,10 @@ test('Testing hashNode', (t) => {
|
|||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hashNode === 'function', 'hashNode is a Function');
|
t.true(typeof hashNode === 'function', 'hashNode is a Function');
|
||||||
|
hashNode(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(v => t.equal(v, '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393', 'Produces the appropriate hash'));
|
||||||
//t.deepEqual(hashNode(args..), 'Expected');
|
//t.deepEqual(hashNode(args..), 'Expected');
|
||||||
//t.equal(hashNode(args..), 'Expected');
|
//t.equal(hashNode(args..), 'Expected');
|
||||||
//t.false(hashNode(args..), 'Expected');
|
//t.false(hashNode(args..), 'Expected');
|
||||||
//t.throws(hashNode(args..), 'Expected');
|
//t.throws(hashNode(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Test log for: Sun Feb 04 2018 17:54:05 GMT+0200 (GTB Standard Time)
|
Test log for: Sun Feb 04 2018 20:45:51 GMT+0200 (GTB Standard Time)
|
||||||
|
|
||||||
> 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code
|
> 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code
|
||||||
> tape test/**/*.test.js | tap-spec
|
> tape test/**/*.test.js | tap-spec
|
||||||
@ -1096,6 +1096,7 @@ Test log for: Sun Feb 04 2018 17:54:05 GMT+0200 (GTB Standard Time)
|
|||||||
Testing pipeAsyncFunctions
|
Testing pipeAsyncFunctions
|
||||||
|
|
||||||
√ pipeAsyncFunctions is a Function
|
√ pipeAsyncFunctions is a Function
|
||||||
|
√ Produces the appropriate hash
|
||||||
√ pipeAsyncFunctions result should be 15
|
√ pipeAsyncFunctions result should be 15
|
||||||
|
|
||||||
Testing pipeFunctions
|
Testing pipeFunctions
|
||||||
@ -1705,8 +1706,8 @@ Test log for: Sun Feb 04 2018 17:54:05 GMT+0200 (GTB Standard Time)
|
|||||||
√ Works with multiple promises
|
√ Works with multiple promises
|
||||||
|
|
||||||
|
|
||||||
total: 812
|
total: 813
|
||||||
passing: 812
|
passing: 813
|
||||||
duration: 2.5s
|
duration: 2.4s
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user