mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 22:11:22 +00:00
fix(ignore): Cleanup publish options (#27226)
This commit is contained in:
1 parent
39e4468308
commit
b7b92da8ff
18 files changed
+277
-307
No files matched your search
@@ -108,10 +108,10 @@ describe("Extension: Bind", () => {
|
||||
},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true, qos: 0});
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true});
|
||||
|
||||
// Teardown
|
||||
target.binds = originalTargetBinds;
|
||||
@@ -125,7 +125,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Invalid payload"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -184,10 +184,10 @@ describe("Extension: Bind", () => {
|
||||
},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true, qos: 0});
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true});
|
||||
|
||||
// Teardown
|
||||
target.binds = originalTargetBinds;
|
||||
@@ -254,10 +254,10 @@ describe("Extension: Bind", () => {
|
||||
},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true, qos: 0});
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith("zigbee2mqtt/bridge/devices", expect.any(String), {retain: true});
|
||||
|
||||
// Teardown
|
||||
target.configuredReportings = originalTargetCR;
|
||||
@@ -277,7 +277,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {from: "remote", from_endpoint: "default", to: "bulb_color", clusters: ["genOnOff"], failed: []}, status: "ok"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -292,7 +292,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Nothing to bind"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -344,7 +344,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "default", to: "bulb_color", clusters: ["genScenes", "genOnOff", "genLevelCtrl"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
|
||||
// Teardown
|
||||
@@ -370,7 +370,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "default", to: "Coordinator", clusters: ["genScenes", "genOnOff", "genLevelCtrl"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -401,7 +401,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "default", to: "group_1", clusters: ["genScenes", "genOnOff", "genLevelCtrl"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
|
||||
// Should configure reporting for device added to group
|
||||
@@ -437,7 +437,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "default", to: "group_1", clusters: ["genScenes", "genOnOff", "genLevelCtrl"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -514,7 +514,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "default", to: "1", clusters: ["genScenes", "genOnOff", "genLevelCtrl"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -532,7 +532,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Failed to bind"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -554,7 +554,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: "ep2", to: "wall_switch_double", to_endpoint: "right", clusters: ["genOnOff"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -576,7 +576,7 @@ describe("Extension: Bind", () => {
|
||||
data: {from: "remote", from_endpoint: 2, to: "wall_switch_double", to_endpoint: 3, clusters: ["genOnOff"], failed: []},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -601,7 +601,7 @@ describe("Extension: Bind", () => {
|
||||
},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -617,7 +617,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {from: "remote", from_endpoint: "ep2", to: "wall_switch", clusters: ["genOnOff"], failed: []}, status: "ok"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -644,7 +644,7 @@ describe("Extension: Bind", () => {
|
||||
},
|
||||
status: "ok",
|
||||
}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -656,7 +656,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Source device 'remote_not_existing' does not exist"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -671,7 +671,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Source device 'remote' does not have endpoint 'not_existing_endpoint'"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -683,7 +683,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Target device or group 'bulb_color_not_existing' does not exist"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -698,7 +698,7 @@ describe("Extension: Bind", () => {
|
||||
expect(mockMQTTPublishAsync).toHaveBeenCalledWith(
|
||||
"zigbee2mqtt/bridge/response/device/bind",
|
||||
stringify({data: {}, status: "error", error: "Target device 'bulb_color' does not have endpoint 'not_existing_endpoint'"}),
|
||||
{retain: false, qos: 0},
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user