nav tabs on admin dashboard
This commit is contained in:
16
node_modules/hash.js/test/hash-test.js
generated
vendored
16
node_modules/hash.js/test/hash-test.js
generated
vendored
@@ -2,6 +2,7 @@
|
||||
/* global describe it */
|
||||
|
||||
var assert = require('assert');
|
||||
var crypto = require('crypto');
|
||||
var hash = require('../');
|
||||
|
||||
describe('Hash', function() {
|
||||
@@ -121,4 +122,19 @@ describe('Hash', function() {
|
||||
]
|
||||
]);
|
||||
});
|
||||
|
||||
it('handles utf8 in strings just like crypto', function() {
|
||||
const algorithm = 'sha256';
|
||||
test(hash[algorithm], [
|
||||
'hello', // one byte per character
|
||||
'привет', // two bytes per character
|
||||
'您好', // three bytes per character
|
||||
'👋', // four bytes per character
|
||||
'hello привет 您好 👋!!!' // mixed character lengths
|
||||
].map(str => [str, crypto
|
||||
.createHash(algorithm)
|
||||
.update(str)
|
||||
.digest('hex')]));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user