File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ async function get(args) {
483483
484484// src/hash.ts
485485init_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" ) ;
Original file line number Diff line number Diff 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 } )
You can’t perform that action at this time.
0 commit comments