This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +30
-140
lines changed Expand file tree Collapse file tree 10 files changed +30
-140
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,11 @@ module.exports = (createCommon, options) => {
16
16
17
17
let ipfs
18
18
19
- before ( function ( done ) {
20
- // CI takes longer to instantiate the daemon, so we need to increase the
21
- // timeout for the before step
22
- this . timeout ( 60 * 1000 )
23
-
24
- common . setup ( ( err , factory ) => {
25
- expect ( err ) . to . not . exist ( )
26
- factory . spawnNode ( ( err , node ) => {
27
- expect ( err ) . to . not . exist ( )
28
- ipfs = node
29
- done ( )
30
- } )
31
- } )
19
+ before ( async ( ) => {
20
+ ipfs = await common . setup ( )
32
21
} )
33
22
34
- after ( ( done ) => common . teardown ( done ) )
23
+ after ( ( ) => common . teardown ( ) )
35
24
36
25
it ( 'should get data by multihash' , async ( ) => {
37
26
const testObj = {
Original file line number Diff line number Diff line change @@ -19,22 +19,11 @@ module.exports = (createCommon, options) => {
19
19
20
20
let ipfs
21
21
22
- before ( function ( done ) {
23
- // CI takes longer to instantiate the daemon, so we need to increase the
24
- // timeout for the before step
25
- this . timeout ( 60 * 1000 )
26
-
27
- common . setup ( ( err , factory ) => {
28
- expect ( err ) . to . not . exist ( )
29
- factory . spawnNode ( ( err , node ) => {
30
- expect ( err ) . to . not . exist ( )
31
- ipfs = node
32
- done ( )
33
- } )
34
- } )
22
+ before ( async ( ) => {
23
+ ipfs = await common . setup ( )
35
24
} )
36
25
37
- after ( ( done ) => common . teardown ( done ) )
26
+ after ( ( ) => common . teardown ( ) )
38
27
39
28
it ( 'should get object by multihash' , async ( ) => {
40
29
const obj = {
Original file line number Diff line number Diff line change @@ -19,22 +19,11 @@ module.exports = (createCommon, options) => {
19
19
20
20
let ipfs
21
21
22
- before ( function ( done ) {
23
- // CI takes longer to instantiate the daemon, so we need to increase the
24
- // timeout for the before step
25
- this . timeout ( 60 * 1000 )
26
-
27
- common . setup ( ( err , factory ) => {
28
- expect ( err ) . to . not . exist ( )
29
- factory . spawnNode ( ( err , node ) => {
30
- expect ( err ) . to . not . exist ( )
31
- ipfs = node
32
- done ( )
33
- } )
34
- } )
22
+ before ( async ( ) => {
23
+ ipfs = await common . setup ( )
35
24
} )
36
25
37
- after ( ( done ) => common . teardown ( done ) )
26
+ after ( ( ) => common . teardown ( ) )
38
27
39
28
it ( 'should get empty links by multihash' , async ( ) => {
40
29
const testObj = {
Original file line number Diff line number Diff line change @@ -13,22 +13,11 @@ module.exports = (createCommon, options) => {
13
13
14
14
let ipfs
15
15
16
- before ( function ( done ) {
17
- // CI takes longer to instantiate the daemon, so we need to increase the
18
- // timeout for the before step
19
- this . timeout ( 60 * 1000 )
20
-
21
- common . setup ( ( err , factory ) => {
22
- expect ( err ) . to . not . exist ( )
23
- factory . spawnNode ( ( err , node ) => {
24
- expect ( err ) . to . not . exist ( )
25
- ipfs = node
26
- done ( )
27
- } )
28
- } )
16
+ before ( async ( ) => {
17
+ ipfs = await common . setup ( )
29
18
} )
30
19
31
- after ( ( done ) => common . teardown ( done ) )
20
+ after ( ( ) => common . teardown ( ) )
32
21
33
22
it ( 'should create a new object with no template' , async ( ) => {
34
23
const cid = await ipfs . object . new ( )
Original file line number Diff line number Diff line change @@ -16,22 +16,11 @@ module.exports = (createCommon, options) => {
16
16
17
17
let ipfs
18
18
19
- before ( function ( done ) {
20
- // CI takes longer to instantiate the daemon, so we need to increase the
21
- // timeout for the before step
22
- this . timeout ( 60 * 1000 )
23
-
24
- common . setup ( ( err , factory ) => {
25
- expect ( err ) . to . not . exist ( )
26
- factory . spawnNode ( ( err , node ) => {
27
- expect ( err ) . to . not . exist ( )
28
- ipfs = node
29
- done ( )
30
- } )
31
- } )
19
+ before ( async ( ) => {
20
+ ipfs = await common . setup ( )
32
21
} )
33
22
34
- after ( ( done ) => common . teardown ( done ) )
23
+ after ( ( ) => common . teardown ( ) )
35
24
36
25
it ( 'should add a link to an existing node' , async ( ) => {
37
26
const obj = {
Original file line number Diff line number Diff line change @@ -14,22 +14,11 @@ module.exports = (createCommon, options) => {
14
14
15
15
let ipfs
16
16
17
- before ( function ( done ) {
18
- // CI takes longer to instantiate the daemon, so we need to increase the
19
- // timeout for the before step
20
- this . timeout ( 60 * 1000 )
21
-
22
- common . setup ( ( err , factory ) => {
23
- expect ( err ) . to . not . exist ( )
24
- factory . spawnNode ( ( err , node ) => {
25
- expect ( err ) . to . not . exist ( )
26
- ipfs = node
27
- done ( )
28
- } )
29
- } )
17
+ before ( async ( ) => {
18
+ ipfs = await common . setup ( )
30
19
} )
31
20
32
- after ( ( done ) => common . teardown ( done ) )
21
+ after ( ( ) => common . teardown ( ) )
33
22
34
23
it ( 'should append data to an existing node' , async ( ) => {
35
24
const obj = {
Original file line number Diff line number Diff line change @@ -14,22 +14,11 @@ module.exports = (createCommon, options) => {
14
14
15
15
let ipfs
16
16
17
- before ( function ( done ) {
18
- // CI takes longer to instantiate the daemon, so we need to increase the
19
- // timeout for the before step
20
- this . timeout ( 60 * 1000 )
21
-
22
- common . setup ( ( err , factory ) => {
23
- expect ( err ) . to . not . exist ( )
24
- factory . spawnNode ( ( err , node ) => {
25
- expect ( err ) . to . not . exist ( )
26
- ipfs = node
27
- done ( )
28
- } )
29
- } )
17
+ before ( async ( ) => {
18
+ ipfs = await common . setup ( )
30
19
} )
31
20
32
- after ( ( done ) => common . teardown ( done ) )
21
+ after ( ( ) => common . teardown ( ) )
33
22
34
23
it ( 'should remove a link from an existing node' , async ( ) => {
35
24
const obj1 = {
Original file line number Diff line number Diff line change @@ -14,22 +14,11 @@ module.exports = (createCommon, options) => {
14
14
15
15
let ipfs
16
16
17
- before ( function ( done ) {
18
- // CI takes longer to instantiate the daemon, so we need to increase the
19
- // timeout for the before step
20
- this . timeout ( 60 * 1000 )
21
-
22
- common . setup ( ( err , factory ) => {
23
- expect ( err ) . to . not . exist ( )
24
- factory . spawnNode ( ( err , node ) => {
25
- expect ( err ) . to . not . exist ( )
26
- ipfs = node
27
- done ( )
28
- } )
29
- } )
17
+ before ( async ( ) => {
18
+ ipfs = await common . setup ( )
30
19
} )
31
20
32
- after ( ( done ) => common . teardown ( done ) )
21
+ after ( ( ) => common . teardown ( ) )
33
22
34
23
it ( 'should set data for an existing node' , async ( ) => {
35
24
const obj = {
Original file line number Diff line number Diff line change @@ -17,22 +17,11 @@ module.exports = (createCommon, options) => {
17
17
18
18
let ipfs
19
19
20
- before ( function ( done ) {
21
- // CI takes longer to instantiate the daemon, so we need to increase the
22
- // timeout for the before step
23
- this . timeout ( 60 * 1000 )
24
-
25
- common . setup ( ( err , factory ) => {
26
- expect ( err ) . to . not . exist ( )
27
- factory . spawnNode ( ( err , node ) => {
28
- expect ( err ) . to . not . exist ( )
29
- ipfs = node
30
- done ( )
31
- } )
32
- } )
20
+ before ( async ( ) => {
21
+ ipfs = await common . setup ( )
33
22
} )
34
23
35
- after ( ( done ) => common . teardown ( done ) )
24
+ after ( ( ) => common . teardown ( ) )
36
25
37
26
it ( 'should put an object' , async ( ) => {
38
27
const obj = {
Original file line number Diff line number Diff line change @@ -17,22 +17,11 @@ module.exports = (createCommon, options) => {
17
17
18
18
let ipfs
19
19
20
- before ( function ( done ) {
21
- // CI takes longer to instantiate the daemon, so we need to increase the
22
- // timeout for the before step
23
- this . timeout ( 60 * 1000 )
24
-
25
- common . setup ( ( err , factory ) => {
26
- expect ( err ) . to . not . exist ( )
27
- factory . spawnNode ( ( err , node ) => {
28
- expect ( err ) . to . not . exist ( )
29
- ipfs = node
30
- done ( )
31
- } )
32
- } )
20
+ before ( async ( ) => {
21
+ ipfs = await common . setup ( )
33
22
} )
34
23
35
- after ( ( done ) => common . teardown ( done ) )
24
+ after ( ( ) => common . teardown ( ) )
36
25
37
26
it ( 'should get stats by multihash' , async ( ) => {
38
27
const testObj = {
You can’t perform that action at this time.
0 commit comments