Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
fix: lack of TextEncoder in older nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala authored and vmx committed Jul 9, 2020
1 parent 0f11d5c commit afd52fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/resolver.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ describe('IPLD Format resolver (local)', () => {
const dataLinksNodeBlobs = [
['DAGNode', create(Buffer.from('aaah the data'), links)],
['{Data:Buffer}', createPlain(Buffer.from('aaah the data'), links)],
['{data:ArrayBuffer}', createPlain(new TextEncoder().encode('aaah the data').buffer, links)],
['{data:Uint8Array}', createPlain(new TextEncoder().encode('aaah the data'), links)]
['{data:ArrayBuffer}', createPlain(Uint8Array.from(Buffer.from('aaah the data')).buffer, links)],
['{data:Uint8Array}', createPlain(Uint8Array.from(Buffer.from('aaah the data')), links)]
]

for (const [kind, emptyNodeBlob] of emptyNodeBlobs) {
Expand Down

0 comments on commit afd52fe

Please sign in to comment.