Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit c492997

Browse files
committed
fix: use aegir fixtures instead
1 parent 0bfd011 commit c492997

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/dag-node-test.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ const BlockService = require('ipfs-block-service')
1818
const Block = require('ipfs-block')
1919
const CID = require('cids')
2020
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')
2325

2426
module.exports = (repo) => {
2527
describe('DAGNode', () => {
@@ -421,7 +423,7 @@ module.exports = (repo) => {
421423
})
422424

423425
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
425427

426428
const expectedLinks = [
427429
{
@@ -471,7 +473,7 @@ module.exports = (repo) => {
471473
})
472474

473475
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
475477

476478
const expectedLinks = [
477479
{

0 commit comments

Comments
 (0)