Skip to content

Commit 4226b75

Browse files
committed
Revert changes to hash test
1 parent 01d5eec commit 4226b75

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ async function get(args) {
483483

484484
// src/hash.ts
485485
init_utils();
486-
async function hash(args, multicode, internal = false) {
486+
async function hash(args, multicode = multicodes.RAW, internal = false) {
487487
const [filename] = args;
488488
if (!filename) {
489489
console.error("please pass in a file");

test/hash.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Deno.test({
2323

2424
await t.step('it should create a raw CID for a json file', async () => {
2525
const filepath = './test/assets/hello.json'
26-
const actual = await hash([filepath], multicodes.JSON, true)
27-
const expected = 'zyop8PQypgycyyCEcQsEHoc9Z8S9bQt1CuHuRKnXrAXagVBGxQyvH'
26+
const actual = await hash([filepath], multicodes.RAW, true)
27+
const expected = 'z9brRu3VWh2crTt5nDjmu8dciMkHp1LR3wmDaqEqXHK46RbuTPy3'
2828
assertEquals(actual, expected)
2929

3030
const cid = CID.parse(actual, base58btc.decoder)
31-
assertEquals(cid.code, multicodes.JSON)
32-
assertEquals(cid.byteLength, 39)
31+
assertEquals(cid.code, multicodes.RAW)
32+
assertEquals(cid.byteLength, 38)
3333
assertEquals(cid.multihash.code, 45600)
3434
assertEquals(cid.version, 1)
3535
})

0 commit comments

Comments
 (0)