Skip to content

Commit

Permalink
Backward compatible way of stringifying Uint8Array (#5881)
Browse files Browse the repository at this point in the history
  • Loading branch information
aghassemi committed Oct 28, 2016
1 parent 84b3205 commit d727bdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/functional/test-cid.js
Expand Up @@ -115,7 +115,7 @@ describe('cid', () => {
crypto = results[1];
crypto.sha384Base64 = val => {
if (val instanceof Uint8Array) {
val = '[' + val + ']';
val = '[' + Array.apply([], val).join(',') + ']';
}

return Promise.resolve('sha384(' + val + ')');
Expand Down Expand Up @@ -416,7 +416,7 @@ describe('cid', () => {
let sha384Promise;
crypto.sha384Base64 = val => {
if (val instanceof Uint8Array) {
val = '[' + val + ']';
val = '[' + Array.apply([], val).join(',') + ']';
}

return sha384Promise = Promise.resolve('sha384(' + val + ')');
Expand Down

0 comments on commit d727bdc

Please sign in to comment.