This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree 21 files changed +20
-106
lines changed
21 files changed +20
-106
lines changed Original file line number Diff line number Diff line change 104
104
"devDependencies" : {
105
105
"aegir" : " ^20.3.1" ,
106
106
"browser-process-platform" : " ~0.1.1" ,
107
- "chai" : " ^4.2.0" ,
108
- "chai-as-promised" : " ^7.1.1" ,
109
107
"cross-env" : " ^6.0.0" ,
110
- "dirty-chai" : " ^2.0.1" ,
111
108
"go-ipfs-dep" : " ^0.4.22" ,
112
109
"interface-ipfs-core" : " ^0.115.0" ,
113
110
"ipfsd-ctl" : " ^0.47.1" ,
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
8
-
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
9
5
const ipfsClient = require ( '../src' )
10
-
11
6
const f = require ( './utils/factory' )
12
7
13
8
describe ( '.commands' , function ( ) {
Original file line number Diff line number Diff line change 2
2
'use strict'
3
3
4
4
const multiaddr = require ( 'multiaddr' )
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
-
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
10
6
const f = require ( './utils/factory' )
11
7
const ipfsClient = require ( '../src/index.js' )
12
8
Original file line number Diff line number Diff line change 2
2
'use strict'
3
3
4
4
const isNode = require ( 'detect-node' )
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
-
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
10
6
const ipfsClient = require ( '../src' )
11
7
const f = require ( './utils/factory' )
12
8
Original file line number Diff line number Diff line change 3
3
4
4
'use strict'
5
5
6
- const chai = require ( 'chai' )
7
- const dirtyChai = require ( 'dirty-chai' )
8
- const chaiAsPromised = require ( 'chai-as-promised' )
9
- const expect = chai . expect
10
- chai . use ( dirtyChai )
11
- chai . use ( chaiAsPromised )
6
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
12
7
const { DAGNode } = require ( 'ipld-dag-pb' )
13
8
const CID = require ( 'cids' )
14
9
const ipfsClient = require ( '../src' )
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
8
5
const platform = require ( 'browser-process-platform' )
9
-
10
6
const ipfsClient = require ( '../src' )
11
7
const f = require ( './utils/factory' )
12
8
Original file line number Diff line number Diff line change 2
2
/* eslint max-nested-callbacks: ["error", 8] */
3
3
'use strict'
4
4
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
9
6
const isNode = require ( 'detect-node' )
10
-
11
7
const ipfsClient = require ( '../src' )
12
8
const f = require ( './utils/factory' )
13
9
Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ const multicodec = require('multicodec')
9
9
const multihash = require ( 'multihashes' )
10
10
const PeerId = require ( 'peer-id' )
11
11
const PeerInfo = require ( 'peer-info' )
12
- const chai = require ( 'chai' )
13
- const dirtyChai = require ( 'dirty-chai' )
14
- const expect = chai . expect
15
- chai . use ( dirtyChai )
12
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
16
13
17
14
const IpfsHttpClient = require ( '../' )
18
15
Original file line number Diff line number Diff line change 2
2
/* eslint max-nested-callbacks: ["error", 8] */
3
3
'use strict'
4
4
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const chaiAsPromised = require ( 'chai-as-promised' )
8
- const expect = chai . expect
9
- chai . use ( dirtyChai )
10
- chai . use ( chaiAsPromised )
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
11
6
const loadFixture = require ( 'aegir/fixtures' )
12
7
const mh = require ( 'multihashes' )
13
8
const CID = require ( 'cids' )
Original file line number Diff line number Diff line change 3
3
4
4
'use strict'
5
5
6
- const chai = require ( 'chai' )
7
- const dirtyChai = require ( 'dirty-chai' )
8
- const chaiAsPromised = require ( 'chai-as-promised' )
9
- const expect = chai . expect
10
- chai . use ( dirtyChai )
11
- chai . use ( chaiAsPromised )
6
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
12
7
const loadFixture = require ( 'aegir/fixtures' )
13
8
14
9
const ipfsClient = require ( '../src' )
Original file line number Diff line number Diff line change 2
2
/* eslint max-nested-callbacks: ["error", 8] */
3
3
'use strict'
4
4
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
-
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
10
6
const ipfsClient = require ( '../src' )
11
7
const f = require ( './utils/factory' )
12
8
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha, browser */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
8
5
const Multiaddr = require ( 'multiaddr' )
9
6
const { isBrowser, isWebWorker } = require ( 'ipfs-utils/src/env' )
10
-
11
7
const configure = require ( '../src/lib/configure' )
12
8
13
9
describe ( 'lib/configure' , ( ) => {
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
6
5
const { HTTPError } = require ( 'ky-universal' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
6
const throwsAsync = require ( './utils/throws-async' )
10
7
const errorHandler = require ( '../src/lib/error-handler' )
11
8
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
8
5
const toIterable = require ( '../src/lib/stream-to-iterable' )
9
6
10
7
describe ( 'lib/stream-to-iterable' , ( ) => {
Original file line number Diff line number Diff line change 2
2
/* eslint max-nested-callbacks: ["error", 8] */
3
3
'use strict'
4
4
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
-
5
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
10
6
const ipfsClient = require ( '../src' )
11
7
const f = require ( './utils/factory' )
12
8
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
4
5
const nock = require ( 'nock' )
5
- const chai = require ( 'chai' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const chaiAsPromised = require ( 'chai-as-promised' )
8
- const expect = chai . expect
9
- chai . use ( dirtyChai )
10
- chai . use ( chaiAsPromised )
11
-
12
6
const ipfsClient = require ( '../../src' )
13
7
14
8
describe ( '.swarm.peers' , function ( ) {
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const chaiAsPromised = require ( 'chai-as-promised' )
7
- const expect = chai . expect
8
- chai . use ( dirtyChai )
9
- chai . use ( chaiAsPromised )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
10
5
const pull = require ( 'pull-stream/pull' )
11
6
const collect = require ( 'pull-stream/sinks/collect' )
12
7
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
8
-
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
9
5
const ipfsClient = require ( '../src' )
10
6
const f = require ( './utils/factory' )
11
7
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
8
5
const isNode = require ( 'detect-node' )
9
6
const ipfsClient = require ( '../src/index.js' )
10
7
const ndjson = require ( 'ndjson' )
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
8
-
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
9
5
const ipfsClient = require ( '../src' )
10
6
const f = require ( './utils/factory' )
11
7
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
8
-
4
+ const { expect } = require ( 'interface-ipfs-core/src/utils/mocha' )
9
5
const defaultConfig = require ( '../src/utils/default-config.js' )
10
6
const config = defaultConfig ( )
11
7
config . host = 'test'
You can’t perform that action at this time.
0 commit comments