@iobroker/testing 3.0.0 → 3.0.1
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 +1 -1
- package/build/tests/integration/index.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
PLACEHOLDER for next version:
|
|
5
5
|
## __WORK IN PROGRESS__
|
|
6
6
|
-->
|
|
7
|
-
## 3.0.
|
|
7
|
+
## 3.0.1 (2022-05-09)
|
|
8
8
|
* BREAKING: The function signature of `defineAdditionalTests` in integration tests has changed. All user-defined integration tests must now be grouped in one or more `suite` blocks. The adapter will now only be started at the beginning of each suite. See the documentation for details.
|
|
9
9
|
* BREAKING: The function signature of `harness.startAdapterAndWait` has changed. It now accepts a boolean as the first parameter which controls whether to wait for the `alive` state (`false`) or the `info.connection` state (`true`).
|
|
10
10
|
|
|
@@ -175,13 +175,18 @@ function testAdapter(adapterDir, options = {}) {
|
|
|
175
175
|
describe("User-defined tests", () => {
|
|
176
176
|
// patch the global it() function so nobody can bypass the checks
|
|
177
177
|
global.it = patchedIt;
|
|
178
|
+
const lazyHarness = new Proxy({}, {
|
|
179
|
+
get(target, propKey) {
|
|
180
|
+
return harness[propKey];
|
|
181
|
+
},
|
|
182
|
+
});
|
|
178
183
|
const args = {
|
|
179
184
|
// a test suite is a special describe which sets up and tears down the test environment before and after ALL tests
|
|
180
185
|
suite: (name, fn) => {
|
|
181
186
|
describe(name, () => {
|
|
182
187
|
isInSuite = true;
|
|
183
188
|
before(resetDbAndStartHarness);
|
|
184
|
-
fn(
|
|
189
|
+
fn(lazyHarness);
|
|
185
190
|
after(shutdownTests);
|
|
186
191
|
isInSuite = false;
|
|
187
192
|
});
|