You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2-35Lines changed: 2 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,39 +2,6 @@
2
2
3
3
Project instructions for AI coding agents (Claude Code, Cursor, Codex, etc.). All agents working in this repo should read this file. For deeper architecture and conventions, see [CLAUDE.md](./CLAUDE.md).
4
4
5
-
## Running tests
5
+
## Scoped Guidance
6
6
7
-
This is a Yarn project — use `yarn`, not `npm`.
8
-
9
-
```bash
10
-
yarn test# full suite
11
-
yarn test:coverage # with NYC coverage
12
-
yarn test:watch # watch mode
13
-
```
14
-
15
-
### `yarn test` failing with `ERR_MODULE_NOT_FOUND` — read this first
16
-
17
-
If `yarn test` fails with an error like:
18
-
19
-
```
20
-
Error: Cannot find package '@cards/...' imported from test/.../foo.spec.ts
21
-
code: 'ERR_MODULE_NOT_FOUND'
22
-
```
23
-
24
-
**It is not a module-resolution problem.** The path aliases (`@cards/*`, `@hass/*`, `@delegates/*`, …) are configured correctly in [tsconfig.json](./tsconfig.json) and registered at runtime via `tsconfig-paths/register` in [.mocharc.json](./.mocharc.json).
25
-
26
-
The real cause is a **TypeScript compilation error** somewhere in the imported file or its transitive imports. `ts-node` surfaces those as a misleading module-resolution error.
27
-
28
-
**To diagnose, always run:**
29
-
30
-
```bash
31
-
npx tsc -p tsconfig.test.json --noEmit
32
-
```
33
-
34
-
Fix the type errors it reports, then rerun `yarn test`. Do not investigate `tsconfig` paths, the test config, or stash changes to compare against `main` — that is wasted effort.
35
-
36
-
## Other conventions
37
-
38
-
- Prettier formatting: `yarn format`
39
-
- Build: `yarn build` (Parcel)
40
-
- See [CLAUDE.md](./CLAUDE.md) for architecture, directory layout, and TypeScript path aliases.
7
+
Read the nearest `AGENTS.md` before changing files in a subdirectory. Scoped files exist under `test/`, `src/cards/`, `src/config/`, `src/delegates/`, `src/editor/`, `src/hass/`, `src/html/`, `src/localize/`, `src/theme/`, `src/translations/`, `src/types/`, and `src/util/`.
Copy file name to clipboardExpand all lines: CLAUDE.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,11 @@ This is a **Yarn project**. Use `yarn` commands instead of `npm` for consistency
19
19
20
20
### Testing
21
21
22
-
-`yarn test` - Run tests using Mocha with TypeScript
22
+
-`yarn test` - Run unit tests using Mocha with TypeScript
23
23
-`yarn test:coverage` - Run tests with NYC coverage reporting
24
24
-`yarn test:watch` - Run tests in watch mode for development
25
+
-`yarn test:e2e` - Run Playwright end-to-end tests against a live Home Assistant instance
26
+
-`yarn test:e2e:auth` - Capture a Playwright storage state for authenticated e2e runs (requires `.env` with `PLAYWRIGHT_HA_ORIGIN` and `PLAYWRIGHT_HA_STORAGE_STATE`)
25
27
26
28
### Single Test Execution
27
29
@@ -46,33 +48,45 @@ This is a **Home Assistant custom card** built with **LitElement/Lit** that disp
Copy file name to clipboardExpand all lines: docs/index.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,3 +378,8 @@ This project is protected under the MIT License. For more details, refer to the
378
378
## Build & Code Quality
379
379
380
380
Check out **[Build Documentation](BUILD.md)**!
381
+
---
382
+
383
+
<p align="center">
384
+
<em>Built and maintained by <a href="https://curiouscat.consulting/projects/ha-room-summary-card?utm_source=github-room-summary-card&utm_medium=docs-site&utm_campaign=oss-presence&utm_content=footer">Curious Cat Consulting</a></em>
0 commit comments