@iobroker/testing 2.5.2 → 2.5.5
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/CHANGELOG.md +10 -1
- package/LICENSE +1 -1
- package/build/index.js +5 -1
- package/build/lib/adapterTools.d.ts +1 -10
- package/build/lib/adapterTools.js +10 -7
- package/build/tests/index.js +1 -0
- package/build/tests/integration/index.js +33 -26
- package/build/tests/integration/lib/adapterSetup.d.ts +3 -4
- package/build/tests/integration/lib/adapterSetup.js +23 -18
- package/build/tests/integration/lib/controllerSetup.d.ts +3 -6
- package/build/tests/integration/lib/controllerSetup.js +29 -21
- package/build/tests/integration/lib/dbConnection.d.ts +46 -22
- package/build/tests/integration/lib/dbConnection.js +263 -47
- package/build/tests/integration/lib/harness.d.ts +7 -11
- package/build/tests/integration/lib/harness.js +48 -104
- package/build/tests/integration/lib/tools.js +5 -1
- package/build/tests/packageFiles/index.js +18 -1
- package/build/tests/unit/mocks/mockAdapterCore.js +5 -1
- package/package.json +26 -26
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -111,6 +115,19 @@ function validatePackageFiles(adapterDir) {
|
|
|
111
115
|
it(`The repository type is "git"`, () => {
|
|
112
116
|
(0, chai_1.expect)(packageContent.repository.type).to.equal("git");
|
|
113
117
|
});
|
|
118
|
+
it("npm is not listed as a dependency", () => {
|
|
119
|
+
for (const depType of [
|
|
120
|
+
"dependencies",
|
|
121
|
+
"devDependencies",
|
|
122
|
+
"optionalDependencies",
|
|
123
|
+
"peerDependencies",
|
|
124
|
+
]) {
|
|
125
|
+
if ((0, typeguards_1.isObject)(packageContent[depType]) &&
|
|
126
|
+
"npm" in packageContent[depType]) {
|
|
127
|
+
throw new chai_1.AssertionError(`npm must not be listed in ${depType}, found "${packageContent[depType].npm}"!`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
114
131
|
});
|
|
115
132
|
describe(`Check contents of io-package.json`, () => {
|
|
116
133
|
var _a;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/testing",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "Shared utilities for adapter and module testing in ioBroker",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -38,38 +38,38 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/AlCalzone/testing#readme",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@alcalzone/release-script": "^3.
|
|
42
|
-
"@alcalzone/release-script-plugin-license": "^3.3
|
|
43
|
-
"@iobroker/adapter-core": "^2.
|
|
41
|
+
"@alcalzone/release-script": "^3.5.4",
|
|
42
|
+
"@alcalzone/release-script-plugin-license": "^3.5.3",
|
|
43
|
+
"@iobroker/adapter-core": "^2.6.0",
|
|
44
44
|
"@tsconfig/node12": "^1.0.9",
|
|
45
|
-
"@types/chai": "^4.
|
|
46
|
-
"@types/chai-as-promised": "^7.1.
|
|
45
|
+
"@types/chai": "^4.3.0",
|
|
46
|
+
"@types/chai-as-promised": "^7.1.5",
|
|
47
47
|
"@types/debug": "4.1.7",
|
|
48
|
-
"@types/fs-extra": "^9.0.
|
|
49
|
-
"@types/iobroker": "^
|
|
50
|
-
"@types/mocha": "^9.
|
|
51
|
-
"@types/node": "^16.
|
|
52
|
-
"@types/sinon": "^10.0.
|
|
53
|
-
"@types/sinon-chai": "^3.2.
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
55
|
-
"@typescript-eslint/parser": "^
|
|
56
|
-
"eslint": "^
|
|
57
|
-
"eslint-config-prettier": "^8.
|
|
48
|
+
"@types/fs-extra": "^9.0.13",
|
|
49
|
+
"@types/iobroker": "^4.0.1",
|
|
50
|
+
"@types/mocha": "^9.1.0",
|
|
51
|
+
"@types/node": "^16.11.26",
|
|
52
|
+
"@types/sinon": "^10.0.11",
|
|
53
|
+
"@types/sinon-chai": "^3.2.8",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
55
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
56
|
+
"eslint": "^8.10.0",
|
|
57
|
+
"eslint-config-prettier": "^8.5.0",
|
|
58
58
|
"eslint-plugin-prettier": "^4.0.0",
|
|
59
|
-
"prettier": "^2.
|
|
59
|
+
"prettier": "^2.5.1",
|
|
60
60
|
"rimraf": "^3.0.2",
|
|
61
|
-
"source-map-support": "^0.5.
|
|
62
|
-
"ts-node": "^10.
|
|
63
|
-
"typescript": "~4.
|
|
61
|
+
"source-map-support": "^0.5.21",
|
|
62
|
+
"ts-node": "^10.6.0",
|
|
63
|
+
"typescript": "~4.6.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"alcalzone-shared": "~4.0.
|
|
67
|
-
"chai": "^4.3.
|
|
66
|
+
"alcalzone-shared": "~4.0.1",
|
|
67
|
+
"chai": "^4.3.6",
|
|
68
68
|
"chai-as-promised": "^7.1.1",
|
|
69
|
-
"debug": "^4.3.
|
|
70
|
-
"fs-extra": "^10.0.
|
|
71
|
-
"mocha": "^9.
|
|
72
|
-
"sinon": "^
|
|
69
|
+
"debug": "^4.3.3",
|
|
70
|
+
"fs-extra": "^10.0.1",
|
|
71
|
+
"mocha": "^9.2.1",
|
|
72
|
+
"sinon": "^13.0.1",
|
|
73
73
|
"sinon-chai": "^3.7.0"
|
|
74
74
|
}
|
|
75
75
|
}
|