@matterbridge/jest-utils 3.9.0-dev-20260612-80cb9b0 → 3.9.0-dev-20260612-8a95934
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/dist/jestMatterTest.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export declare let aggregator: Endpoint<AggregatorEndpoint>;
|
|
|
10
10
|
export declare function createTestEnvironment(): Promise<Environment>;
|
|
11
11
|
export declare function destroyTestEnvironment(): Promise<void>;
|
|
12
12
|
export declare function getMatterbridge(): PlatformMatterbridge;
|
|
13
|
+
export declare const addBridgedEndpoint: import("jest-mock").Mock<(pluginName: string, device: Endpoint) => Promise<boolean>>;
|
|
14
|
+
export declare const removeBridgedEndpoint: import("jest-mock").Mock<(pluginName: string, device: Endpoint) => Promise<boolean>>;
|
|
15
|
+
export declare const removeAllBridgedEndpoints: import("jest-mock").Mock<(pluginName: string, _delay?: number) => Promise<boolean>>;
|
|
16
|
+
export declare const addVirtualEndpoint: import("jest-mock").Mock<(pluginName: string, name: string, type: "light" | "outlet" | "switch" | "mounted_switch", callback: () => Promise<void>) => Promise<boolean>>;
|
|
13
17
|
export declare const addBridgedEndpointMatterbridgeSpy: import("jest-mock").Mock<(pluginName: string, device: Endpoint) => Promise<boolean>>;
|
|
14
18
|
export declare const removeBridgedEndpointMatterbridgeSpy: import("jest-mock").Mock<(pluginName: string, device: Endpoint) => Promise<boolean>>;
|
|
15
19
|
export declare const removeAllBridgedEndpointsMatterbridgeSpy: import("jest-mock").Mock<(pluginName: string, _delay?: number) => Promise<boolean>>;
|
package/dist/jestMatterTest.js
CHANGED
|
@@ -76,7 +76,7 @@ export function getMatterbridge() {
|
|
|
76
76
|
};
|
|
77
77
|
return matterbridge;
|
|
78
78
|
}
|
|
79
|
-
const addBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
79
|
+
export const addBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
80
80
|
try {
|
|
81
81
|
await aggregator.add(device);
|
|
82
82
|
return Promise.resolve(true);
|
|
@@ -85,7 +85,7 @@ const addBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
|
85
85
|
return Promise.reject(error);
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
const removeBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
88
|
+
export const removeBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
89
89
|
try {
|
|
90
90
|
await device.delete();
|
|
91
91
|
return Promise.resolve(true);
|
|
@@ -94,7 +94,7 @@ const removeBridgedEndpoint = jest.fn(async (pluginName, device) => {
|
|
|
94
94
|
return Promise.reject(error);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
const removeAllBridgedEndpoints = jest.fn(async (pluginName, _delay = 0) => {
|
|
97
|
+
export const removeAllBridgedEndpoints = jest.fn(async (pluginName, _delay = 0) => {
|
|
98
98
|
try {
|
|
99
99
|
for (const device of aggregator.parts) {
|
|
100
100
|
await device.delete();
|
|
@@ -105,7 +105,7 @@ const removeAllBridgedEndpoints = jest.fn(async (pluginName, _delay = 0) => {
|
|
|
105
105
|
return Promise.reject(error);
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
const addVirtualEndpoint = jest.fn(async (pluginName, name, type, callback) => {
|
|
108
|
+
export const addVirtualEndpoint = jest.fn(async (pluginName, name, type, callback) => {
|
|
109
109
|
try {
|
|
110
110
|
const device = new Endpoint(MountedOnOffControlDevice.with(BridgedDeviceBasicInformationServer), {
|
|
111
111
|
id: name.replaceAll(' ', '') + ':' + type,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/jest-utils",
|
|
3
|
-
"version": "3.9.0-dev-20260612-
|
|
3
|
+
"version": "3.9.0-dev-20260612-8a95934",
|
|
4
4
|
"description": "Matterbridge jest utility library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"CHANGELOG.md"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@matterbridge/types": "3.9.0-dev-20260612-
|
|
68
|
+
"@matterbridge/types": "3.9.0-dev-20260612-8a95934",
|
|
69
69
|
"node-ansi-logger": "3.3.0-dev-20260607-585945a"
|
|
70
70
|
}
|
|
71
71
|
}
|