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 committed Jun 5, 2020
1 parent ed66d9e commit 2eaff18
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 2eaff18

Please sign in to comment.