@iobroker/testing 5.0.0 → 5.0.3
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/LICENSE +1 -1
- package/README.md +1 -1
- package/build/index.d.ts +1 -1
- package/build/lib/adapterTools.d.ts +7 -1
- package/build/lib/adapterTools.js +36 -21
- package/build/lib/executeCommand.d.ts +3 -2
- package/build/lib/executeCommand.js +30 -29
- package/build/lib/str2regex.js +4 -4
- package/build/tests/index.d.ts +9 -9
- package/build/tests/integration/index.d.ts +1 -1
- package/build/tests/integration/index.js +44 -39
- package/build/tests/integration/lib/adapterSetup.d.ts +1 -1
- package/build/tests/integration/lib/adapterSetup.js +50 -52
- package/build/tests/integration/lib/controllerSetup.d.ts +1 -10
- package/build/tests/integration/lib/controllerSetup.js +59 -56
- package/build/tests/integration/lib/dbConnection.d.ts +12 -12
- package/build/tests/integration/lib/dbConnection.js +71 -69
- package/build/tests/integration/lib/harness.d.ts +9 -7
- package/build/tests/integration/lib/harness.js +68 -49
- package/build/tests/integration/lib/logger.js +1 -1
- package/build/tests/integration/lib/tools.d.ts +6 -1
- package/build/tests/integration/lib/tools.js +27 -12
- package/build/tests/packageFiles/index.js +92 -90
- package/build/tests/unit/harness/createMocks.d.ts +3 -2
- package/build/tests/unit/harness/createMocks.js +0 -1
- package/build/tests/unit/index.js +5 -4
- package/build/tests/unit/mocks/mockAdapter.d.ts +3 -3
- package/build/tests/unit/mocks/mockAdapter.js +195 -162
- package/build/tests/unit/mocks/mockAdapterCore.d.ts +4 -9
- package/build/tests/unit/mocks/mockAdapterCore.js +23 -14
- package/build/tests/unit/mocks/mockDatabase.d.ts +13 -12
- package/build/tests/unit/mocks/mockDatabase.js +40 -45
- package/build/tests/unit/mocks/mockLogger.d.ts +1 -1
- package/build/tests/unit/mocks/mockLogger.js +1 -1
- package/build/tests/unit/mocks/tools.d.ts +2 -2
- package/build/tests/unit/mocks/tools.js +14 -11
- package/package.json +15 -22
|
@@ -15,25 +15,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.mockAdapterCore = mockAdapterCore;
|
|
27
37
|
const os = __importStar(require("os"));
|
|
28
38
|
const path = __importStar(require("path"));
|
|
29
39
|
const mockAdapter_1 = require("./mockAdapter");
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
31
40
|
function mockAdapterCore(database, options = {}) {
|
|
32
41
|
/**
|
|
33
42
|
* The root directory of JS-Controller
|
|
34
43
|
* If this has to exist in the test, the user/tester has to take care of it!
|
|
35
44
|
*/
|
|
36
|
-
const controllerDir = path.join(options.adapterDir ||
|
|
45
|
+
const controllerDir = path.join(options.adapterDir || '', '..', 'iobroker.js-controller');
|
|
37
46
|
const dataDir = path.join(os.tmpdir(), `test-iobroker-data`);
|
|
38
47
|
/**
|
|
39
48
|
* The test location for iobroker-data
|
|
@@ -55,14 +64,14 @@ function mockAdapterCore(database, options = {}) {
|
|
|
55
64
|
}
|
|
56
65
|
const AdapterConstructor = function (nameOrOptions) {
|
|
57
66
|
// This needs to be a class with the correct `this` context or the ES6 tests won't work
|
|
58
|
-
if (!(this instanceof AdapterConstructor))
|
|
67
|
+
if (!(this instanceof AdapterConstructor)) {
|
|
59
68
|
return new AdapterConstructor(nameOrOptions);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
: nameOrOptions;
|
|
69
|
+
}
|
|
70
|
+
const createAdapterMockOptions = typeof nameOrOptions === 'string' ? { name: nameOrOptions } : nameOrOptions;
|
|
63
71
|
mockAdapter_1.createAdapterMock.bind(this)(database, createAdapterMockOptions);
|
|
64
|
-
if (typeof options.onAdapterCreated ===
|
|
72
|
+
if (typeof options.onAdapterCreated === 'function') {
|
|
65
73
|
options.onAdapterCreated(this);
|
|
74
|
+
}
|
|
66
75
|
return this;
|
|
67
76
|
};
|
|
68
77
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MockAdapter } from
|
|
1
|
+
import type { MockAdapter } from './mockAdapter';
|
|
2
2
|
/**
|
|
3
3
|
* A minimalistic version of ioBroker's Objects and States DB that just operates on a Map
|
|
4
4
|
*/
|
|
@@ -33,19 +33,20 @@ export declare class MockDatabase {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns a collection of predefined assertions to be used in unit tests
|
|
35
35
|
* Those include assertions for:
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* - State exists
|
|
37
|
+
* - State has a certain value, ack flag, object property
|
|
38
|
+
* - Object exists
|
|
39
|
+
* - Object has a certain common or native part
|
|
40
|
+
*
|
|
40
41
|
* @param db The mock database to operate on
|
|
41
42
|
* @param adapter The mock adapter to operate on
|
|
42
43
|
*/
|
|
43
44
|
export declare function createAsserts(db: MockDatabase, adapter: MockAdapter): {
|
|
44
|
-
assertObjectExists(id: string | string[])
|
|
45
|
-
assertStateExists(id: string | string[])
|
|
46
|
-
assertStateHasValue(id: string | string[], value: any)
|
|
47
|
-
assertStateIsAcked(id: string | string[], ack
|
|
48
|
-
assertStateProperty(id: string | string[], property: string, value: any)
|
|
49
|
-
assertObjectCommon(id: string | string[], common: ioBroker.ObjectCommon)
|
|
50
|
-
assertObjectNative(id: string | string[], native: Record<string, any>)
|
|
45
|
+
assertObjectExists: (id: string | string[]) => void;
|
|
46
|
+
assertStateExists: (id: string | string[]) => void;
|
|
47
|
+
assertStateHasValue: (id: string | string[], value: any) => void;
|
|
48
|
+
assertStateIsAcked: (id: string | string[], ack: boolean) => void;
|
|
49
|
+
assertStateProperty: (id: string | string[], property: string, value: any) => void;
|
|
50
|
+
assertObjectCommon: (id: string | string[], common: ioBroker.ObjectCommon) => void;
|
|
51
|
+
assertObjectNative: (id: string | string[], native: Record<string, any>) => void;
|
|
51
52
|
};
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MockDatabase = void 0;
|
|
4
4
|
exports.createAsserts = createAsserts;
|
|
5
5
|
const objects_1 = require("alcalzone-shared/objects");
|
|
6
|
-
const typeguards_1 = require("alcalzone-shared/typeguards");
|
|
7
6
|
const str2regex_1 = require("../../../lib/str2regex");
|
|
8
7
|
const objectTemplate = Object.freeze({
|
|
9
|
-
type:
|
|
10
|
-
common: { name:
|
|
8
|
+
type: 'state',
|
|
9
|
+
common: { name: 'an object' },
|
|
11
10
|
native: {},
|
|
12
11
|
});
|
|
13
12
|
const stateTemplate = Object.freeze({
|
|
@@ -33,10 +32,12 @@ class MockDatabase {
|
|
|
33
32
|
this.clearStates();
|
|
34
33
|
}
|
|
35
34
|
publishObject(obj) {
|
|
36
|
-
if (obj._id == null)
|
|
37
|
-
throw new Error(
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
if (obj._id == null) {
|
|
36
|
+
throw new Error('An object must have an ID');
|
|
37
|
+
}
|
|
38
|
+
if (obj.type == null) {
|
|
39
|
+
throw new Error('An object must have a type');
|
|
40
|
+
}
|
|
40
41
|
const completeObject = (0, objects_1.extend)({}, objectTemplate, obj);
|
|
41
42
|
this.objects.set(obj._id, completeObject);
|
|
42
43
|
}
|
|
@@ -44,22 +45,16 @@ class MockDatabase {
|
|
|
44
45
|
objects.forEach(this.publishObject.bind(this));
|
|
45
46
|
}
|
|
46
47
|
publishStateObjects(...objects) {
|
|
47
|
-
objects
|
|
48
|
-
.map((obj) => (0, objects_1.extend)({}, obj, { type: "state" }))
|
|
49
|
-
.forEach(this.publishObject.bind(this));
|
|
48
|
+
objects.map(obj => (0, objects_1.extend)({}, obj, { type: 'state' })).forEach(this.publishObject.bind(this));
|
|
50
49
|
}
|
|
51
50
|
publishChannelObjects(...objects) {
|
|
52
|
-
objects
|
|
53
|
-
.map((obj) => (0, objects_1.extend)({}, obj, { type: "channel" }))
|
|
54
|
-
.forEach(this.publishObject.bind(this));
|
|
51
|
+
objects.map(obj => (0, objects_1.extend)({}, obj, { type: 'channel' })).forEach(this.publishObject.bind(this));
|
|
55
52
|
}
|
|
56
53
|
publishDeviceObjects(...objects) {
|
|
57
|
-
objects
|
|
58
|
-
.map((obj) => (0, objects_1.extend)({}, obj, { type: "device" }))
|
|
59
|
-
.forEach(this.publishObject.bind(this));
|
|
54
|
+
objects.map(obj => (0, objects_1.extend)({}, obj, { type: 'device' })).forEach(this.publishObject.bind(this));
|
|
60
55
|
}
|
|
61
56
|
deleteObject(objOrID) {
|
|
62
|
-
this.objects.delete(typeof objOrID ===
|
|
57
|
+
this.objects.delete(typeof objOrID === 'string' ? objOrID : objOrID._id);
|
|
63
58
|
}
|
|
64
59
|
publishState(id, state) {
|
|
65
60
|
// if (typeof id !== "string") throw new Error("The id must be given!");
|
|
@@ -79,72 +74,74 @@ class MockDatabase {
|
|
|
79
74
|
}
|
|
80
75
|
}
|
|
81
76
|
hasObject(namespaceOrId, id) {
|
|
82
|
-
id = namespaceOrId + (id ?
|
|
77
|
+
id = namespaceOrId + (id ? `.${id}` : '');
|
|
83
78
|
return this.objects.has(id);
|
|
84
79
|
}
|
|
85
80
|
getObject(namespaceOrId, id) {
|
|
86
81
|
// combines getObject and getForeignObject into one
|
|
87
|
-
id = namespaceOrId + (id ?
|
|
82
|
+
id = namespaceOrId + (id ? `.${id}` : '');
|
|
88
83
|
return this.objects.get(id);
|
|
89
84
|
}
|
|
90
85
|
hasState(namespaceOrId, id) {
|
|
91
|
-
id = namespaceOrId + (id ?
|
|
86
|
+
id = namespaceOrId + (id ? `.${id}` : '');
|
|
92
87
|
return this.states.has(id);
|
|
93
88
|
}
|
|
94
89
|
getState(namespaceOrId, id) {
|
|
95
90
|
// combines getObject and getForeignObject into one
|
|
96
|
-
id = namespaceOrId + (id ?
|
|
91
|
+
id = namespaceOrId + (id ? `.${id}` : '');
|
|
97
92
|
return this.states.get(id);
|
|
98
93
|
}
|
|
99
|
-
getObjects(namespaceOrPattern,
|
|
94
|
+
getObjects(namespaceOrPattern,
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
96
|
+
patternOrType, type) {
|
|
100
97
|
// combines getObjects and getForeignObjects into one
|
|
101
98
|
let pattern;
|
|
102
99
|
if (type != null) {
|
|
103
|
-
pattern =
|
|
104
|
-
namespaceOrPattern + (patternOrType ? "." + patternOrType : "");
|
|
100
|
+
pattern = namespaceOrPattern + (patternOrType ? `.${patternOrType}` : '');
|
|
105
101
|
}
|
|
106
102
|
else if (patternOrType != null) {
|
|
107
|
-
if ([
|
|
103
|
+
if (['state', 'channel', 'device'].indexOf(patternOrType) > -1) {
|
|
108
104
|
type = patternOrType;
|
|
109
105
|
pattern = namespaceOrPattern;
|
|
110
106
|
}
|
|
111
107
|
else {
|
|
112
|
-
pattern = namespaceOrPattern
|
|
108
|
+
pattern = `${namespaceOrPattern}.${patternOrType}`;
|
|
113
109
|
}
|
|
114
110
|
}
|
|
115
111
|
else {
|
|
116
112
|
pattern = namespaceOrPattern;
|
|
117
113
|
}
|
|
118
114
|
const idRegExp = (0, str2regex_1.str2regex)(pattern);
|
|
119
|
-
return
|
|
115
|
+
return Object.fromEntries([...this.objects.entries()]
|
|
120
116
|
.filter(([id]) => idRegExp.test(id))
|
|
121
117
|
.filter(([, obj]) => type == null || obj.type === type));
|
|
122
118
|
}
|
|
123
119
|
getStates(pattern) {
|
|
124
120
|
// combines getStates and getForeignStates into one
|
|
125
121
|
const idRegExp = (0, str2regex_1.str2regex)(pattern);
|
|
126
|
-
return
|
|
122
|
+
return Object.fromEntries([...this.states.entries()].filter(([id]) => idRegExp.test(id)));
|
|
127
123
|
}
|
|
128
124
|
}
|
|
129
125
|
exports.MockDatabase = MockDatabase;
|
|
130
126
|
/**
|
|
131
127
|
* Returns a collection of predefined assertions to be used in unit tests
|
|
132
128
|
* Those include assertions for:
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
129
|
+
* - State exists
|
|
130
|
+
* - State has a certain value, ack flag, object property
|
|
131
|
+
* - Object exists
|
|
132
|
+
* - Object has a certain common or native part
|
|
133
|
+
*
|
|
137
134
|
* @param db The mock database to operate on
|
|
138
135
|
* @param adapter The mock adapter to operate on
|
|
139
136
|
*/
|
|
140
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
141
137
|
function createAsserts(db, adapter) {
|
|
142
138
|
function normalizeID(id) {
|
|
143
|
-
if (
|
|
144
|
-
id = id.join(
|
|
139
|
+
if (Array.isArray(id)) {
|
|
140
|
+
id = id.join('.');
|
|
141
|
+
}
|
|
145
142
|
// Test if this ID is fully qualified
|
|
146
143
|
if (!/^[a-z0-9\-_]+\.\d+\./.test(id)) {
|
|
147
|
-
id = adapter.namespace
|
|
144
|
+
id = `${adapter.namespace}.${id}`;
|
|
148
145
|
}
|
|
149
146
|
return id;
|
|
150
147
|
}
|
|
@@ -158,31 +155,29 @@ function createAsserts(db, adapter) {
|
|
|
158
155
|
db.hasState(id).should.equal(true, `The state "${adapter.namespace}.${id}" does not exist but it was expected to!`);
|
|
159
156
|
},
|
|
160
157
|
assertStateHasValue(id, value) {
|
|
161
|
-
ret.assertStateProperty(id,
|
|
158
|
+
ret.assertStateProperty(id, 'val', value);
|
|
162
159
|
},
|
|
163
160
|
assertStateIsAcked(id, ack = true) {
|
|
164
|
-
ret.assertStateProperty(id,
|
|
161
|
+
ret.assertStateProperty(id, 'ack', ack);
|
|
165
162
|
},
|
|
166
163
|
assertStateProperty(id, property, value) {
|
|
167
164
|
id = normalizeID(id);
|
|
168
165
|
ret.assertStateExists(id);
|
|
169
|
-
db.getState(id)
|
|
170
|
-
.should.be.an("object")
|
|
171
|
-
.that.has.property(property, value);
|
|
166
|
+
db.getState(id).should.be.an('object').that.has.property(property, value);
|
|
172
167
|
},
|
|
173
168
|
assertObjectCommon(id, common) {
|
|
174
169
|
id = normalizeID(id);
|
|
175
170
|
ret.assertObjectExists(id);
|
|
176
171
|
const dbObj = db.getObject(id);
|
|
177
|
-
dbObj.should.be.an(
|
|
178
|
-
dbObj.common.should.be.an(
|
|
172
|
+
dbObj.should.be.an('object').that.has.property('common');
|
|
173
|
+
dbObj.common.should.be.an('object').that.nested.include(common);
|
|
179
174
|
},
|
|
180
175
|
assertObjectNative(id, native) {
|
|
181
176
|
id = normalizeID(id);
|
|
182
177
|
ret.assertObjectExists(id);
|
|
183
178
|
const dbObj = db.getObject(id);
|
|
184
|
-
dbObj.should.be.an(
|
|
185
|
-
dbObj.native.should.be.an(
|
|
179
|
+
dbObj.should.be.an('object').that.has.property('native');
|
|
180
|
+
dbObj.native.should.be.an('object').that.nested.include(native);
|
|
186
181
|
},
|
|
187
182
|
};
|
|
188
183
|
return ret;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Equals, Overwrite } from
|
|
1
|
+
import type { Equals, Overwrite } from 'alcalzone-shared/types';
|
|
2
2
|
export type IsAny<T> = Equals<T extends never ? false : true, boolean>;
|
|
3
3
|
export type MockableMethods<T, All = Required<T>, NoAny = {
|
|
4
4
|
[K in keyof All]: IsAny<All[K]> extends true ? never : All[K] extends (...args: any[]) => void ? K : never;
|
|
@@ -9,4 +9,4 @@ export type Mock<T extends {}> = Overwrite<T, {
|
|
|
9
9
|
export declare function doResetHistory(parent: Record<string, any>): void;
|
|
10
10
|
export declare function doResetBehavior(parent: Record<string, any>, implementedMethods: Record<string, any>): void;
|
|
11
11
|
export declare function stubAndPromisifyImplementedMethods<T extends string>(parent: Record<T, any>, implementedMethods: Partial<Record<T, any>>, allowUserOverrides?: T[]): void;
|
|
12
|
-
export type ImplementedMethodDictionary<T> = Partial<Record<MockableMethods<T>,
|
|
12
|
+
export type ImplementedMethodDictionary<T> = Partial<Record<MockableMethods<T>, 'none' | 'normal' | 'no error'>>;
|
|
@@ -8,47 +8,50 @@ const sinon_1 = require("sinon");
|
|
|
8
8
|
function doResetHistory(parent) {
|
|
9
9
|
for (const prop of Object.keys(parent)) {
|
|
10
10
|
const val = parent[prop];
|
|
11
|
-
if (val && typeof val.resetHistory ===
|
|
11
|
+
if (val && typeof val.resetHistory === 'function') {
|
|
12
12
|
val.resetHistory();
|
|
13
|
+
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
function doResetBehavior(parent, implementedMethods) {
|
|
16
17
|
for (const prop of Object.keys(parent)) {
|
|
17
|
-
if (prop in implementedMethods ||
|
|
18
|
-
(prop.endsWith("Async") && prop.slice(0, -5) in implementedMethods))
|
|
18
|
+
if (prop in implementedMethods || (prop.endsWith('Async') && prop.slice(0, -5) in implementedMethods)) {
|
|
19
19
|
continue;
|
|
20
|
+
}
|
|
20
21
|
const val = parent[prop];
|
|
21
|
-
if (val && typeof val.resetBehavior ===
|
|
22
|
+
if (val && typeof val.resetBehavior === 'function') {
|
|
22
23
|
val.resetBehavior();
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
function dontOverwriteThis() {
|
|
26
|
-
throw new Error(
|
|
28
|
+
throw new Error('You must not overwrite the behavior of this stub!');
|
|
27
29
|
}
|
|
28
30
|
function stubAndPromisifyImplementedMethods(parent, implementedMethods, allowUserOverrides = []) {
|
|
29
31
|
// The methods implemented above are no stubs, but we claimed they are
|
|
30
32
|
// Therefore hook them up with a real stub
|
|
31
33
|
for (const methodName of Object.keys(implementedMethods)) {
|
|
32
|
-
if (methodName.endsWith(
|
|
34
|
+
if (methodName.endsWith('Async')) {
|
|
33
35
|
continue;
|
|
36
|
+
}
|
|
34
37
|
const originalMethod = parent[methodName];
|
|
35
38
|
const callbackFake = (parent[methodName] = (0, sinon_1.stub)());
|
|
36
39
|
callbackFake.callsFake(originalMethod);
|
|
37
40
|
// Prevent the user from changing the stub's behavior
|
|
38
|
-
if (allowUserOverrides.
|
|
41
|
+
if (!allowUserOverrides.includes(methodName)) {
|
|
39
42
|
callbackFake.returns = dontOverwriteThis;
|
|
40
43
|
callbackFake.callsFake = dontOverwriteThis;
|
|
41
44
|
}
|
|
42
45
|
// Construct the async fake if there's any
|
|
43
46
|
const asyncType = implementedMethods[methodName];
|
|
44
|
-
if (asyncType ===
|
|
47
|
+
if (asyncType === 'none') {
|
|
45
48
|
continue;
|
|
46
|
-
|
|
49
|
+
}
|
|
50
|
+
const promisifyMethod = asyncType === 'no error' ? async_1.promisifyNoError : async_1.promisify;
|
|
47
51
|
const asyncFake = (0, sinon_1.stub)().callsFake(promisifyMethod(originalMethod, parent));
|
|
48
52
|
parent[`${methodName}Async`] = asyncFake;
|
|
49
53
|
// Prevent the user from changing the stub's behavior
|
|
50
|
-
if (allowUserOverrides.
|
|
51
|
-
allowUserOverrides.indexOf((methodName + "Async")) === -1) {
|
|
54
|
+
if (!allowUserOverrides.includes(methodName) || !allowUserOverrides.includes(`${methodName}Async`)) {
|
|
52
55
|
asyncFake.returns = dontOverwriteThis;
|
|
53
56
|
asyncFake.callsFake = dontOverwriteThis;
|
|
54
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/testing",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
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",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"lint:ts": "eslint -c eslint.config.mjs",
|
|
19
19
|
"lint": "npm run lint:ts",
|
|
20
20
|
"release": "release-script",
|
|
21
|
-
"update-packages": "
|
|
21
|
+
"update-packages": "npx -y npm-check-updates --upgrade"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -41,37 +41,30 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@alcalzone/release-script": "^3.8.0",
|
|
43
43
|
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
44
|
-
"@
|
|
45
|
-
"@eslint
|
|
46
|
-
"@iobroker/
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@types/chai": "^
|
|
50
|
-
"@types/chai-as-promised": "^8.0.0",
|
|
44
|
+
"@iobroker/adapter-core": "^3.2.3",
|
|
45
|
+
"@iobroker/eslint-config": "^1.0.0",
|
|
46
|
+
"@iobroker/types": "^7.0.6",
|
|
47
|
+
"@tsconfig/node16": "^16.1.3",
|
|
48
|
+
"@types/chai": "^4.3.20",
|
|
49
|
+
"@types/chai-as-promised": "^8.0.1",
|
|
51
50
|
"@types/debug": "4.1.12",
|
|
52
51
|
"@types/fs-extra": "^11.0.4",
|
|
53
|
-
"@types/mocha": "^10.0.
|
|
54
|
-
"@types/node": "^22.
|
|
52
|
+
"@types/mocha": "^10.0.10",
|
|
53
|
+
"@types/node": "^22.10.7",
|
|
55
54
|
"@types/sinon": "^17.0.3",
|
|
56
55
|
"@types/sinon-chai": "^3.2.12",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
|
58
|
-
"@typescript-eslint/parser": "^8.5.0",
|
|
59
|
-
"eslint": "^9.10.0",
|
|
60
|
-
"eslint-config-prettier": "^9.1.0",
|
|
61
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
62
|
-
"prettier": "^3.3.3",
|
|
63
56
|
"rimraf": "^6.0.1",
|
|
64
57
|
"source-map-support": "^0.5.21",
|
|
65
58
|
"ts-node": "^10.9.2",
|
|
66
|
-
"typescript": "~5.
|
|
59
|
+
"typescript": "~5.7.3"
|
|
67
60
|
},
|
|
68
61
|
"dependencies": {
|
|
69
|
-
"alcalzone-shared": "~
|
|
62
|
+
"alcalzone-shared": "~5.0.0",
|
|
70
63
|
"chai": "^4.5.0",
|
|
71
64
|
"chai-as-promised": "^7.1.2",
|
|
72
|
-
"debug": "^4.
|
|
73
|
-
"fs-extra": "^11.
|
|
74
|
-
"mocha": "^
|
|
65
|
+
"debug": "^4.4.0",
|
|
66
|
+
"fs-extra": "^11.3.0",
|
|
67
|
+
"mocha": "^11.0.1",
|
|
75
68
|
"sinon": "^19.0.2",
|
|
76
69
|
"sinon-chai": "^3.7.0"
|
|
77
70
|
}
|