-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8045c01
commit aa4c930
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { describe, expect, it, vi } from 'vitest' | ||
|
||
import { EntityList } from './entity-list' | ||
describe('EntityList', () => { | ||
it('compiles', () => { | ||
const hass = { | ||
socket: { | ||
onConnect: vi.fn(), | ||
onDisconnect: vi.fn(), | ||
onUpdate: vi.fn(), | ||
}, | ||
} | ||
const logger = { debug: vi.fn(), info: vi.fn() } | ||
const home_automation = { | ||
helper: { doStuff: vi.fn(), theChosenEntity: { onUpdate: vi.fn() } }, | ||
} | ||
|
||
// @ts-expect-error these are not fully fledged out as this is a quick example | ||
EntityList({ hass, home_automation, logger }) | ||
expect(hass.socket.onConnect).toHaveBeenCalledTimes(1) | ||
expect(home_automation.helper.theChosenEntity.onUpdate).toHaveBeenCalledTimes(1) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.