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

Commit

Permalink
feat: next aegir
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Aug 27, 2017
1 parent 9a08912 commit 447ddf6
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 79 deletions.
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "A test suite and interface you can use to implement a IPFS core interface.",
"main": "src/index.js",
"scripts": {
"test": "exit(0)",
"lint": "aegir-lint",
"release": "aegir-release node",
"release-minor": "aegir-release node --type minor",
"release-major": "aegir-release node --type major",
"coverage": "exit(0)",
"coverage-publish": "exit(0)"
"test": "exit 0",
"lint": "aegir lint",
"release": "aegir release node",
"release-minor": "aegir release node --type minor",
"release-major": "aegir release node --type major",
"coverage": "exit 0",
"coverage-publish": "exit 0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,8 +40,7 @@
"multihashes": "^0.4.8",
"multihashing-async": "^0.4.6",
"peer-id": "^0.9.0",
"pull-stream": "^3.6.0",
"safe-buffer": "^5.1.1"
"pull-stream": "^3.6.0"
},
"devDependencies": {
"aegir": "^12.0.0",
Expand All @@ -63,4 +62,4 @@
"haad <haad@headbanggames.com>",
"nginnever <ginneversource@gmail.com>"
]
}
}
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ module.exports = (common) => {
})

it('fail on non valid key', (done) => {
ipfs.config.set(new Buffer('heeey'), '', (err) => {
ipfs.config.set(Buffer.from('heeey'), '', (err) => {
expect(err).to.exist()
done()
})
})

it('fail on non valid value', (done) => {
ipfs.config.set('Fruit', new Buffer('abc'), (err) => {
ipfs.config.set('Fruit', Buffer.from('abc'), (err) => {
expect(err).to.exist()
done()
})
Expand Down
14 changes: 7 additions & 7 deletions src/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = (common) => {
let cborNode

before((done) => {
const someData = new Buffer('some data')
const someData = Buffer.from('some data')

pbNode = DAGNode.create(someData, (err, node) => {
expect(err).to.not.exist()
Expand Down Expand Up @@ -134,7 +134,7 @@ module.exports = (common) => {
before((done) => {
series([
(cb) => {
const someData = new Buffer('some other data')
const someData = Buffer.from('some other data')

pbNode = DAGNode.create(someData, (err, node) => {
expect(err).to.not.exist()
Expand All @@ -147,7 +147,7 @@ module.exports = (common) => {
}
},
(cb) => {
dagPB.DAGNode.create(new Buffer('I am inside a Protobuf'), (err, node) => {
dagPB.DAGNode.create(Buffer.from('I am inside a Protobuf'), (err, node) => {
expect(err).to.not.exist()
nodePb = node
cb()
Expand Down Expand Up @@ -240,7 +240,7 @@ module.exports = (common) => {
it('dag-pb local scope', (done) => {
ipfs.dag.get(cidPb, 'Data', (err, result) => {
expect(err).to.not.exist()
expect(result.value).to.eql(new Buffer('I am inside a Protobuf'))
expect(result.value).to.eql(Buffer.from('I am inside a Protobuf'))
done()
})
})
Expand Down Expand Up @@ -277,7 +277,7 @@ module.exports = (common) => {
it('from dag-cbor to dag-pb', (done) => {
ipfs.dag.get(cidCbor, 'pb/Data', (err, result) => {
expect(err).to.not.exist()
expect(result.value).to.eql(new Buffer('I am inside a Protobuf'))
expect(result.value).to.eql(Buffer.from('I am inside a Protobuf'))
done()
})
})
Expand All @@ -303,7 +303,7 @@ module.exports = (common) => {

ipfs.dag.get(cidCborStr + '/pb/Data', (err, result) => {
expect(err).to.not.exist()
expect(result.value).to.eql(new Buffer('I am inside a Protobuf'))
expect(result.value).to.eql(Buffer.from('I am inside a Protobuf'))
done()
})
})
Expand All @@ -319,7 +319,7 @@ module.exports = (common) => {
before((done) => {
series([
(cb) => {
dagPB.DAGNode.create(new Buffer('I am inside a Protobuf'), (err, node) => {
dagPB.DAGNode.create(Buffer.from('I am inside a Protobuf'), (err, node) => {
expect(err).to.not.exist()
nodePb = node
cb()
Expand Down
Loading

0 comments on commit 447ddf6

Please sign in to comment.