Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit db434b0

Browse files
committed
refactor: only use low-level block api in refs-local interface test
Follows on from #2980 but uses the unixfs-importer which has been refactored to only use the block API, allowing implementations to be written from low-level APIs upwards.
1 parent d2579c0 commit db434b0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/interface-ipfs-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"dirty-chai": "^2.0.1",
3939
"ipfs-block": "^0.8.1",
4040
"ipfs-unixfs": "^1.0.1",
41+
"ipfs-unixfs-importer": "^2.0.0",
4142
"ipfs-utils": "^2.2.0",
4243
"ipld-dag-cbor": "^0.15.1",
4344
"ipld-dag-pb": "^0.18.3",

packages/interface-ipfs-core/src/refs-local.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
const { fixtures } = require('./utils')
55
const { getDescribe, getIt, expect } = require('./utils/mocha')
66
const all = require('it-all')
7+
const importer = require('ipfs-unixfs-importer')
78

89
/** @typedef { import("ipfsd-ctl/src/factory") } Factory */
910
/**
@@ -36,7 +37,7 @@ module.exports = (common, options) => {
3637
content('holmes.txt')
3738
]
3839

39-
await all(ipfs.add(dirs))
40+
await all(importer(dirs, ipfs.block))
4041

4142
const refs = await all(ipfs.refs.local())
4243

0 commit comments

Comments
 (0)