This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,18 @@ const multiaddr = require('multiaddr')
9
9
const multibase = require ( 'multibase' )
10
10
const multihash = require ( 'multihashes' )
11
11
const CID = require ( 'cids' )
12
-
13
12
const chai = require ( 'chai' )
14
13
const dirtyChai = require ( 'dirty-chai' )
14
+ const { getDescribe, getIt } = require ( './utils/mocha' )
15
+
15
16
const expect = chai . expect
16
17
chai . use ( dirtyChai )
17
18
18
- module . exports = ( common ) => {
19
+ module . exports = ( createCommon , options ) => {
20
+ const describe = getDescribe ( options )
21
+ const it = getIt ( options )
22
+ const common = createCommon ( )
23
+
19
24
describe ( '.types' , function ( ) {
20
25
let ipfs
21
26
@@ -34,11 +39,9 @@ module.exports = (common) => {
34
39
} )
35
40
} )
36
41
37
- after ( ( done ) => {
38
- common . teardown ( done )
39
- } )
42
+ after ( ( done ) => common . teardown ( done ) )
40
43
41
- it ( 'types object' , ( ) => {
44
+ it ( 'should have a types object with the required values ' , ( ) => {
42
45
expect ( ipfs . types ) . to . be . deep . equal ( {
43
46
Buffer : Buffer ,
44
47
PeerId : PeerId ,
Original file line number Diff line number Diff line change @@ -5,10 +5,16 @@ const crypto = require('libp2p-crypto')
5
5
const isIPFS = require ( 'is-ipfs' )
6
6
const chai = require ( 'chai' )
7
7
const dirtyChai = require ( 'dirty-chai' )
8
+ const { getDescribe, getIt } = require ( './utils/mocha' )
9
+
8
10
const expect = chai . expect
9
11
chai . use ( dirtyChai )
10
12
11
- module . exports = ( common ) => {
13
+ module . exports = ( createCommon , options ) => {
14
+ const describe = getDescribe ( options )
15
+ const it = getIt ( options )
16
+ const common = createCommon ( )
17
+
12
18
describe ( '.util' , function ( ) {
13
19
let ipfs
14
20
@@ -27,11 +33,9 @@ module.exports = (common) => {
27
33
} )
28
34
} )
29
35
30
- after ( ( done ) => {
31
- common . teardown ( done )
32
- } )
36
+ after ( ( done ) => common . teardown ( done ) )
33
37
34
- it ( 'util object' , ( ) => {
38
+ it ( 'should have a util object with the required values ' , ( ) => {
35
39
expect ( ipfs . util ) . to . be . deep . equal ( {
36
40
crypto : crypto ,
37
41
isIPFS : isIPFS
You can’t perform that action at this time.
0 commit comments