Skip to content

Commit d1cd27e

Browse files
Documentation updates
1 parent 42edee4 commit d1cd27e

4 files changed

Lines changed: 961 additions & 1043 deletions

File tree

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AGENTS Notes — ngrx-hateoas workspace
2+
3+
Purpose
4+
- This workspace contains an Angular library, `@angular-architects/ngrx-hateoas`, built on top of the NgRx Signal Store. The library helps load hypermedia JSON resources into a reactive signal-based store, mutate state locally and execute hypermedia-driven actions.
5+
6+
Key locations
7+
- Library source: `libs/ngrx-hateoas`
8+
- Documentation (user guide): `doc/docs/guide` (see Getting Started, Concept, Pipes, Configuration, Loading Features, State Mutation Features, Action Features)
9+
- Playground app (demo + local server): `apps/playground` (contains `server.js` and `db.json` for local demonstration)
10+
11+
How tests are written (libs/ngrx-hateoas)
12+
- Location: `libs/ngrx-hateoas/src/lib/**/*.spec.ts`.
13+
- Framework / runner: Angular unit tests using Jasmine (see `tsconfig.spec.json` types: `jasmine`) and Angular TestBed utilities.
14+
- Common patterns:
15+
- Use `TestBed.configureTestingModule(...)` with providers such as `provideZonelessChangeDetection()`, `provideHttpClient()` and `provideHttpClientTesting()` where needed.
16+
- Services that call HTTP use `HttpTestingController` and `expectOne(...).flush(...)` to simulate server responses and assert request properties (method, body, headers).
17+
- Many tests assert metastate signals (e.g., `isLoading`, `isLoaded`, `isAvailable`) and verify reactive behavior (cancellation of previous requests, reactive reloads when a `Signal` changes) via `signalStore`, `signal()` and `TestBed.flushEffects()` where applicable.
18+
- Tests use `async/await` or `expectAsync` for promise-based operations and standard Jasmine matchers (`toBeTrue`, `toBeFalse`, `toEqual`, `toBe`, `toBeDefined`, etc.).
19+
- Tests cover pipes, services (request/hateoas), and store-features (loading, writable copies, actions), focusing on isolated unit behavior.
20+
21+
Playground / local demo
22+
- `apps/playground` contains a minimal Angular app and local server artifacts (`db.json`, `server.js`) useful to run the library locally against a fake REST API for manual testing and demos.
23+
24+
Rules for agents (editing / extending)
25+
- When changing features, update matching docs in `doc/docs/guide/*` and add/adjust unit tests under `libs/ngrx-hateoas/src/lib/**`.
26+
- For HTTP-related behavior, follow existing test patterns using `provideHttpClientTesting()` and `HttpTestingController`.
27+
- Use `provideZonelessChangeDetection()` in TestBed providers to match existing test environment.
28+
29+
References
30+
- See `doc/docs/guide/01-getting-started.md` and `doc/docs/guide/02-concept.md` for conceptual details and examples.

doc/docusaurus.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const config: Config = {
2121
projectName: 'ngrx-hateoas', // Usually your repo name.
2222

2323
onBrokenLinks: 'throw',
24-
onBrokenMarkdownLinks: 'warn',
2524

2625
// Even if you don't use internationalization, you can use this field to set
2726
// useful metadata like html lang. For example, if your site is Chinese, you

0 commit comments

Comments
 (0)