|
3 | 3 |
|
4 | 4 | const crypto = require('libp2p-crypto') |
5 | 5 | const isIPFS = require('is-ipfs') |
6 | | - |
7 | 6 | const chai = require('chai') |
8 | 7 | const dirtyChai = require('dirty-chai') |
9 | 8 | const expect = chai.expect |
10 | 9 | chai.use(dirtyChai) |
11 | 10 |
|
12 | | -describe('.types', function () { |
13 | | - let ipfs |
| 11 | +module.exports = (common) => { |
| 12 | + describe('.util', function () { |
| 13 | + let ipfs |
14 | 14 |
|
15 | | - before(function (done) { |
16 | | - // CI takes longer to instantiate the daemon, so we need to increase the |
17 | | - // timeout for the before step |
18 | | - this.timeout(60 * 1000) |
| 15 | + before(function (done) { |
| 16 | + // CI takes longer to instantiate the daemon, so we need to increase the |
| 17 | + // timeout for the before step |
| 18 | + this.timeout(60 * 1000) |
19 | 19 |
|
20 | | - common.setup((err, factory) => { |
21 | | - expect(err).to.not.exist() |
22 | | - factory.spawnNode((err, node) => { |
| 20 | + common.setup((err, factory) => { |
23 | 21 | expect(err).to.not.exist() |
24 | | - ipfs = node |
25 | | - done() |
| 22 | + factory.spawnNode((err, node) => { |
| 23 | + expect(err).to.not.exist() |
| 24 | + ipfs = node |
| 25 | + done() |
| 26 | + }) |
26 | 27 | }) |
27 | 28 | }) |
28 | | - }) |
29 | 29 |
|
30 | | - after((done) => { |
31 | | - common.teardown(done) |
32 | | - }) |
| 30 | + after((done) => { |
| 31 | + common.teardown(done) |
| 32 | + }) |
33 | 33 |
|
34 | | - it('util object', () => { |
35 | | - expect(ipfs.util).to.be.deep.equal({ |
36 | | - crypto: crypto, |
37 | | - isIPFS: isIPFS |
| 34 | + it('util object', () => { |
| 35 | + expect(ipfs.util).to.be.deep.equal({ |
| 36 | + crypto: crypto, |
| 37 | + isIPFS: isIPFS |
| 38 | + }) |
38 | 39 | }) |
39 | 40 | }) |
40 | | -}) |
| 41 | +} |
0 commit comments