{"id":21260309,"url":"https://github.com/digital-alchemy-ts/hass-unit-testing-sample","last_synced_at":"2026-05-10T17:15:44.399Z","repository":{"id":238056907,"uuid":"795709268","full_name":"Digital-Alchemy-TS/hass-unit-testing-sample","owner":"Digital-Alchemy-TS","description":"A quick example project to demonstrate the process of creating unit tests for automations","archived":false,"fork":false,"pushed_at":"2024-05-06T20:15:48.000Z","size":1348,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-21T21:47:30.244Z","etag":null,"topics":["digital-alchemy","example-code","homeassistant","homeautomation","jest","typescript","unit-testing"],"latest_commit_sha":null,"homepage":"https://docs.digital-alchemy.app/hass/unit-testing","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Digital-Alchemy-TS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"zoe-codez","patreon":null,"open_collective":null,"ko_fi":"zoe_codez","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-05-03T21:32:29.000Z","updated_at":"2024-05-06T20:15:52.000Z","dependencies_parsed_at":"2024-05-06T20:46:43.241Z","dependency_job_id":null,"html_url":"https://github.com/Digital-Alchemy-TS/hass-unit-testing-sample","commit_stats":null,"previous_names":["digital-alchemy-ts/hass-unit-testing-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Alchemy-TS%2Fhass-unit-testing-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Alchemy-TS%2Fhass-unit-testing-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Alchemy-TS%2Fhass-unit-testing-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Alchemy-TS%2Fhass-unit-testing-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Digital-Alchemy-TS","download_url":"https://codeload.github.com/Digital-Alchemy-TS/hass-unit-testing-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695537,"owners_count":20332626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digital-alchemy","example-code","homeassistant","homeautomation","jest","typescript","unit-testing"],"created_at":"2024-11-21T04:17:34.176Z","updated_at":"2026-05-10T17:15:44.349Z","avatar_url":"https://github.com/Digital-Alchemy-TS.png","language":"TypeScript","funding_links":["https://github.com/sponsors/zoe-codez","https://ko-fi.com/zoe_codez"],"categories":[],"sub_categories":[],"readme":"## 🌐 Overview\n\nWelcome to the Digital Alchemy example unit tests repo.\nThis code exists as a functional example of implementing unit tests within a nodejs application that works with Home Assistant.\n\nYou are able to able to run the tests standalone, without connecting to any instance of Home Assistant.\nThe configuration used to build the code is provided [here](./hass/), so you are able to build on the existing work to create your own mock environment.\n\n- [Extended documentation](https://docs.digital-alchemy.app/hass/unit-testing)\n- Ask questions on [Discord](https://discord.gg/JkZ35Gv97Y)\n\n## 👢 Try it out\n\nThe following commands will install dependencies, configure type definitions for the project, and run the tests.\n\n```bash\nnpm install\ncp ./hass/types.d.ts ./node_modules/@digital-alchemy/hass/dist/dynamic.d.ts\nnpm run test\n```\n\n![passing tests](/assets/schedule-test.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-alchemy-ts%2Fhass-unit-testing-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-alchemy-ts%2Fhass-unit-testing-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-alchemy-ts%2Fhass-unit-testing-sample/lists"}