@dashevo/dapi-client 0.25.12 → 0.25.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/test/bootstrap.js +13 -19
- package/lib/test/karma/bootstrap.js +37 -0
- package/lib/test/karma/loader.js +1 -1
- package/package.json +7 -7
package/lib/test/bootstrap.js
CHANGED
|
@@ -12,26 +12,20 @@ use(sinonChai);
|
|
|
12
12
|
use(chaiAsPromised);
|
|
13
13
|
use(dirtyChai);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
exports.mochaHooks = {
|
|
16
|
+
beforeAll: loadDpp,
|
|
18
17
|
|
|
19
|
-
beforeEach(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
afterEach(function afterEach() {
|
|
28
|
-
this.sinon.restore();
|
|
29
|
-
});
|
|
18
|
+
beforeEach() {
|
|
19
|
+
if (!this.sinon) {
|
|
20
|
+
this.sinon = sinon.createSandbox();
|
|
21
|
+
} else {
|
|
22
|
+
this.sinon.restore();
|
|
23
|
+
}
|
|
24
|
+
},
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
26
|
+
afterEach() {
|
|
27
|
+
this.sinon.restore();
|
|
28
|
+
},
|
|
29
|
+
};
|
|
36
30
|
|
|
37
31
|
global.expect = expect;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require('../../../polyfills/fetch-polyfill');
|
|
2
|
+
require('setimmediate');
|
|
3
|
+
|
|
4
|
+
const { expect, use } = require('chai');
|
|
5
|
+
const sinon = require('sinon');
|
|
6
|
+
const sinonChai = require('sinon-chai');
|
|
7
|
+
const dirtyChai = require('dirty-chai');
|
|
8
|
+
const chaiAsPromised = require('chai-as-promised');
|
|
9
|
+
const { default: loadDpp } = require('@dashevo/wasm-dpp');
|
|
10
|
+
|
|
11
|
+
use(sinonChai);
|
|
12
|
+
use(chaiAsPromised);
|
|
13
|
+
use(dirtyChai);
|
|
14
|
+
|
|
15
|
+
before(async () => {
|
|
16
|
+
await loadDpp();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
beforeEach(function beforeEach() {
|
|
20
|
+
if (!this.sinon) {
|
|
21
|
+
this.sinon = sinon.createSandbox();
|
|
22
|
+
} else {
|
|
23
|
+
this.sinon.restore();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
afterEach(function afterEach() {
|
|
28
|
+
this.sinon.restore();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
before(function before() {
|
|
32
|
+
if (!this.sinon) {
|
|
33
|
+
this.sinon = sinon.createSandbox();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
global.expect = expect;
|
package/lib/test/karma/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is used for compiling tests with webpack into one file for using with karma
|
|
2
|
-
require('
|
|
2
|
+
require('./bootstrap');
|
|
3
3
|
|
|
4
4
|
// noinspection JSUnresolvedFunction
|
|
5
5
|
const testsContext = require.context('../../../test', true, /^(?!.*functional).*\.js$/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-client",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.15",
|
|
4
4
|
"description": "Client library used to access Dash DAPI endpoints",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"contributors": [
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dashevo/dapi-grpc": "0.25.
|
|
30
|
-
"@dashevo/dash-spv": "0.25.
|
|
29
|
+
"@dashevo/dapi-grpc": "0.25.15",
|
|
30
|
+
"@dashevo/dash-spv": "0.25.15",
|
|
31
31
|
"@dashevo/dashcore-lib": "~0.21.0",
|
|
32
|
-
"@dashevo/grpc-common": "0.25.
|
|
33
|
-
"@dashevo/wasm-dpp": "0.25.
|
|
32
|
+
"@dashevo/grpc-common": "0.25.15",
|
|
33
|
+
"@dashevo/wasm-dpp": "0.25.15",
|
|
34
34
|
"bs58": "^4.0.1",
|
|
35
35
|
"cbor": "^8.0.0",
|
|
36
36
|
"google-protobuf": "^3.12.2",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"karma": "^6.4.1",
|
|
61
61
|
"karma-chai": "^0.1.0",
|
|
62
62
|
"karma-chrome-launcher": "^3.1.0",
|
|
63
|
-
"karma-firefox-launcher": "^2.1.
|
|
63
|
+
"karma-firefox-launcher": "^2.1.2",
|
|
64
64
|
"karma-mocha": "^2.0.1",
|
|
65
65
|
"karma-mocha-reporter": "^2.2.5",
|
|
66
66
|
"karma-webpack": "^5.0.0",
|
|
67
|
-
"mocha": "^
|
|
67
|
+
"mocha": "^10.2.0",
|
|
68
68
|
"nyc": "^15.1.0",
|
|
69
69
|
"os-browserify": "^0.3.0",
|
|
70
70
|
"path-browserify": "^1.0.1",
|