Skip to content

Commit

Permalink
Cleanup for dev review
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Apr 8, 2016
1 parent 5b98464 commit e9f4b27
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test:node": "dignified-test node",
"test:browser": "dignified-test browser",
"build": "dignified-build",
"coverage": "istanbul cover --print both -- _mocha test/node.js",
"coverage": "dignified-coverage",
"lint": "dignified-lint",
"release": "dignified-release"
},
Expand All @@ -33,7 +33,6 @@
"dignified.js": "^1.0.0",
"fs-blob-store": "^5.2.1",
"idb-plus-blob-store": "^1.0.0",
"istanbul": "^0.4.2",
"local-storage-blob-store": "0.0.3",
"lodash": "^4.6.1",
"ncp": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ exports.setUp = (basePath, blobStore, locks) => {
let result
try {
result = JSON.parse(config.toString())
} catch (error) {
return callback(error)
} catch (err) {
return callback(err)
}
callback(null, result)
}))
Expand Down
13 changes: 1 addition & 12 deletions test/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ describe('IPFS Repo Tests on on Node.js', () => {
})

const fs = require('fs-blob-store')
const options = {
stores: {
keys: fs,
config: fs,
datastore: fs,
// datastoreLegacy: needs https:/ipfs/js-ipfs-repo/issues/6#issuecomment-164650642
logs: fs,
locks: fs,
version: fs
}
}
const repo = new IPFSRepo(repoPath, options)
const repo = new IPFSRepo(repoPath, {stores: fs})
require('./repo-test')(repo)
})
11 changes: 3 additions & 8 deletions test/repo-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ const expect = require('chai').expect
const base58 = require('bs58')
const bl = require('bl')
const fs = require('fs')
const join = require('path').join

const isNode = !global.window
const fileA = fs.readFileSync(join(__dirname, 'test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data'))

const fileA = isNode
? fs.readFileSync(process.cwd() + '/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')
: require('buffer!./test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')

const fileAExt = isNode
? fs.readFileSync(process.cwd() + '/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext')
: require('buffer!./test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext')
const fileAExt = fs.readFileSync(join(__dirname, 'test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext'))

module.exports = function (repo) {
describe('IPFS Repo Tests', function () {
Expand Down

0 comments on commit e9f4b27

Please sign in to comment.