Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

fix: use latest fixture loading #218

Merged
merged 3 commits into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions js/src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ const tests = (common) => {
let ipfs

function fixture (path) {
return loadFixture(__dirname, path, 'interface-ipfs-core')
return loadFixture(path, 'interface-ipfs-core')
}

const smallFile = {
cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP',
data: fixture('../test/fixtures/testfile.txt')
data: fixture('js/test/fixtures/testfile.txt')
}
const bigFile = {
cid: 'Qme79tX2bViL26vNjPsF3DP1R9rMKMvnPYJiKTTKPrXJjq',
data: fixture('../test/fixtures/15mb.random')
data: fixture('js/test/fixtures/15mb.random')
}

const directory = {
cid: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP',
files: {
'pp.txt': fixture('../test/fixtures/test-folder/pp.txt'),
'holmes.txt': fixture('../test/fixtures/test-folder/holmes.txt'),
'jungle.txt': fixture('../test/fixtures/test-folder/jungle.txt'),
'alice.txt': fixture('../test/fixtures/test-folder/alice.txt'),
'files/hello.txt': fixture('../test/fixtures/test-folder/files/hello.txt'),
'files/ipfs.txt': fixture('../test/fixtures/test-folder/files/ipfs.txt')
'pp.txt': fixture('js/test/fixtures/test-folder/pp.txt'),
'holmes.txt': fixture('js/test/fixtures/test-folder/holmes.txt'),
'jungle.txt': fixture('js/test/fixtures/test-folder/jungle.txt'),
'alice.txt': fixture('js/test/fixtures/test-folder/alice.txt'),
'files/hello.txt': fixture('js/test/fixtures/test-folder/files/hello.txt'),
'files/ipfs.txt': fixture('js/test/fixtures/test-folder/files/ipfs.txt')
}
}

Expand All @@ -68,7 +68,7 @@ const tests = (common) => {

after((done) => common.teardown(done))

describe('.add', () => {
describe.only('.add', () => {
it('a Buffer', (done) => {
ipfs.files.add(smallFile.data, (err, filesAdded) => {
expect(err).to.not.exist()
Expand Down
2 changes: 1 addition & 1 deletion js/src/pin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const expect = chai.expect
chai.use(dirtyChai)
const loadFixture = require('aegir/fixtures')

const testFile = loadFixture(__dirname, '../test/fixtures/testfile.txt', 'interface-ipfs-core')
const testFile = loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core')
const testHash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'

module.exports = (common) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/ipfs/interface-ipfs-core#readme",
"dependencies": {
"aegir": "^12.3.0",
"aegir": "^13.0.0",
"async": "^2.6.0",
"big.js": "^5.0.3",
"bl": "^1.2.1",
Expand All @@ -47,7 +47,7 @@
"multiaddr": "^3.0.2",
"multihashes": "~0.4.13",
"multihashing-async": "~0.4.7",
"peer-id": "~0.10.4",
"peer-id": "~0.10.6",
"pull-stream": "^3.6.1"
},
"devDependencies": {},
Expand Down