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

fix: Typos on bundled libraries pull request #261

Merged
merged 1 commit into from
May 6, 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
1 change: 1 addition & 0 deletions js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ exports.key = require('./key')
exports.stats = require('./stats')
exports.repo = require('./repo')
exports.bootstrap = require('./bootstrap')
exports.types = require('./types')
56 changes: 29 additions & 27 deletions js/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,41 @@ const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)

describe('.types', function () {
let ipfs
module.exports = (common) => {
describe('.types', function () {
let ipfs

before(function (done) {
// CI takes longer to instantiate the daemon, so we need to increase the
// timeout for the before step
this.timeout(60 * 1000)
before(function (done) {
// CI takes longer to instantiate the daemon, so we need to increase the
// timeout for the before step
this.timeout(60 * 1000)

common.setup((err, factory) => {
expect(err).to.not.exist()
factory.spawnNode((err, node) => {
common.setup((err, factory) => {
expect(err).to.not.exist()
ipfs = node
done()
factory.spawnNode((err, node) => {
expect(err).to.not.exist()
ipfs = node
done()
})
})
})
})

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

it('types object', () => {
expect(ipfs.types).to.be.deep.equal({
Buffer: Buffer,
PeerId: PeerId,
PeerInfo: PeerInfo,
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR
it('types object', () => {
expect(ipfs.types).to.be.deep.equal({
Buffer: Buffer,
PeerId: PeerId,
PeerInfo: PeerInfo,
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR
})
})
})
})
}
2 changes: 1 addition & 1 deletion js/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const chai = require('chai')
const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)
util

describe('.types', function () {
let ipfs

Expand Down