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

Commit

Permalink
fix: use latest fixture loading (#218)
Browse files Browse the repository at this point in the history
* fix: use latest fixture loading

* fix: even better

* chore: update deps
  • Loading branch information
daviddias committed Feb 12, 2018
1 parent 01cb74a commit e054097
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
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

0 comments on commit e054097

Please sign in to comment.