Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

27
web/node_modules/object-hash/test/writeToStream.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
'use strict';
var assert = require('assert');
var stream = require('stream');
var hash = require('../index');
describe('writeToStream', function() {
it('should emit information about an object to a stream', function() {
var strm = new stream.PassThrough();
hash.writeToStream({foo: 'bar'}, strm);
var result = strm.read().toString();
assert.strictEqual(typeof result, 'string');
assert.notStrictEqual(result.indexOf('foo'), -1);
assert.notStrictEqual(result.indexOf('bar'), -1);
});
it('should leave out keys when excludeValues = true', function() {
var strm = new stream.PassThrough();
hash.writeToStream({foo: 'bar'}, {excludeValues: true}, strm);
var result = strm.read().toString();
assert.strictEqual(typeof result, 'string');
assert.notStrictEqual(result.indexOf('foo'), -1);
assert. strictEqual(result.indexOf('bar'), -1);
});
});