We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41ba07d commit 1ff8765Copy full SHA for 1ff8765
src/json-pack/json/__tests__/JsonEncoderDag.spec.ts
@@ -36,14 +36,14 @@ describe('Cid', () => {
36
}
37
38
const encoder = new IpfsEncoder(writer);
39
-
+
40
test('can encode a CID as object key', () => {
41
const data = {id: new CID('QmXn5v3z')};
42
const encoded = encoder.encode(data);
43
const json = Buffer.from(encoded).toString();
44
expect(json).toBe('{"id":{"/":"QmXn5v3z"}}');
45
});
46
47
test('can encode a CID in array', () => {
48
const data = ['a', new CID('b'), 'c'];
49
0 commit comments