This repository was archived by the owner on Aug 11, 2021. It is now read-only.
Commit c492997 1 parent 0bfd011 commit c492997 Copy full SHA for c492997
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ const BlockService = require('ipfs-block-service')
18
18
const Block = require ( 'ipfs-block' )
19
19
const CID = require ( 'cids' )
20
20
const bs58 = require ( 'bs58' )
21
- const fs = require ( 'fs' )
22
- const path = require ( 'path' )
21
+ const loadFixture = require ( 'aegir/fixtures' )
22
+
23
+ const testBlockNamedLinks = loadFixture ( __dirname , 'data/test-block-named-links' )
24
+ const testBlockUnnamedLinks = loadFixture ( __dirname , 'data/test-block-unnamed-links' )
23
25
24
26
module . exports = ( repo ) => {
25
27
describe ( 'DAGNode' , ( ) => {
@@ -421,7 +423,7 @@ module.exports = (repo) => {
421
423
} )
422
424
423
425
it ( 'deserialize go-ipfs block with unnamed links' , ( done ) => {
424
- const buf = fs . readFileSync ( path . join ( __dirname , 'data/test-block-unnamed-links' ) )
426
+ const buf = testBlockUnnamedLinks
425
427
426
428
const expectedLinks = [
427
429
{
@@ -471,7 +473,7 @@ module.exports = (repo) => {
471
473
} )
472
474
473
475
it ( 'deserialize go-ipfs block with named links' , ( done ) => {
474
- const buf = fs . readFileSync ( path . join ( __dirname , 'data/test-block-named-links' ) )
476
+ const buf = testBlockNamedLinks
475
477
476
478
const expectedLinks = [
477
479
{
You can’t perform that action at this time.
0 commit comments