mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-18 16:07:40 +01:00
Add formatEntityName helper on hass object. (#26057)
This commit is contained in:
@@ -26,7 +26,13 @@ describe("getEntityContext", () => {
|
||||
floors: {},
|
||||
} as unknown as HomeAssistant;
|
||||
|
||||
const result = getEntityContext(stateObj, hass);
|
||||
const result = getEntityContext(
|
||||
stateObj,
|
||||
hass.entities,
|
||||
hass.devices,
|
||||
hass.areas,
|
||||
hass.floors
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
entity,
|
||||
@@ -71,7 +77,13 @@ describe("getEntityContext", () => {
|
||||
},
|
||||
} as unknown as HomeAssistant;
|
||||
|
||||
const result = getEntityContext(stateObj, hass);
|
||||
const result = getEntityContext(
|
||||
stateObj,
|
||||
hass.entities,
|
||||
hass.devices,
|
||||
hass.areas,
|
||||
hass.floors
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
entity,
|
||||
@@ -105,7 +117,13 @@ describe("getEntityContext", () => {
|
||||
},
|
||||
} as unknown as HomeAssistant;
|
||||
|
||||
const result = getEntityContext(stateObj, hass);
|
||||
const result = getEntityContext(
|
||||
stateObj,
|
||||
hass.entities,
|
||||
hass.devices,
|
||||
hass.areas,
|
||||
hass.floors
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
entity,
|
||||
@@ -138,7 +156,13 @@ describe("getEntityContext", () => {
|
||||
floors: {},
|
||||
} as unknown as HomeAssistant;
|
||||
|
||||
const result = getEntityContext(stateObj, hass);
|
||||
const result = getEntityContext(
|
||||
stateObj,
|
||||
hass.entities,
|
||||
hass.devices,
|
||||
hass.areas,
|
||||
hass.floors
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
entity,
|
||||
|
||||
Reference in New Issue
Block a user