Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
e7bda2c
Create Rules Global
Jul 10, 2026
4c02bfe
intall skills frontend design
Jul 11, 2026
5877b80
install skill agent-skills --skill vercel-react-best-practices
Jul 11, 2026
f7df680
install skill agent-skills --skill web-design-guidelines
Jul 11, 2026
6aba80e
install skill angular-best-practices
Jul 11, 2026
7db4027
install skill java-springboot
Jul 11, 2026
7d81546
install golang-code-style
Jul 11, 2026
8951089
install skill golang-design-patterns
Jul 11, 2026
64d6051
Install skill superpowers --skill brainstorming
Jul 11, 2026
08a1374
docs: add build pipeline spec, roadmap, and phase templates
Jul 11, 2026
1c6810b
chore: add claude code workflow skills, agents, and hooks
Jul 11, 2026
e5619f1
docs: record pipeline planning process and decision log
Jul 11, 2026
5c530a6
docs: mark phase 00 as in progress
Jul 11, 2026
fb8b1d2
build: initialize pnpm workspace
Jul 11, 2026
51a90e2
build: add turborepo task pipeline
Jul 11, 2026
a099f91
feat(config): add shared eslint, prettier, and typescript configs
Jul 11, 2026
468941b
feat(types): add shared event contract types package
Jul 11, 2026
ad78473
feat(shared): add correlation id and event envelope utilities
Jul 11, 2026
1a2ca36
feat(ui): add shared react ui package with placeholder button
Jul 11, 2026
e9f6c5f
chore: add editorconfig for cross-stack editor consistency
Jul 11, 2026
2f0544a
build: add husky pre-commit hook with lint-staged
Jul 11, 2026
a0b0c5a
build: enforce conventional commits with commitlint
Jul 11, 2026
1fb8c7e
chore: add environment variables example
Jul 11, 2026
3f03e36
docs: expand readme with monorepo overview and workflow
Jul 11, 2026
034eecd
fix(shared): use web crypto for runtime-neutral correlation ids
Jul 11, 2026
2013748
docs: align event envelope field to data and record phase 00 decisions
Jul 11, 2026
ffa8de0
chore: add mit license
Jul 11, 2026
8af0d91
docs: mark phase 00 as done
Jul 11, 2026
d8ac3d9
docs: add walking skeleton specification for phase 1
Jul 11, 2026
2f9a1f0
docs: approve walking skeleton spec and add phase 01 checklist
Jul 11, 2026
b99462a
docs: mark phase 01 as in progress
Jul 11, 2026
5f1fd06
feat(web): scaffold next.js storefront with health endpoint
Jul 11, 2026
4ce5a3f
feat(api): scaffold nestjs gateway with health endpoint
Jul 11, 2026
94c69be
feat(admin): scaffold angular admin spa with /admin base href
Jul 11, 2026
070625a
feat(inventory): scaffold go http service with health endpoint
Jul 11, 2026
bd98871
feat(payment): initialize payment service with health endpoint and Ma…
Jul 11, 2026
3a4317c
docs: check off payment scaffold task in phase 01
Jul 12, 2026
e8f6fad
build: drive go and spring apps through turborepo wrappers
Jul 12, 2026
cce7cbd
build(web): add multi-stage dockerfile with turbo prune
Jul 12, 2026
cc254b0
build(api): add multi-stage dockerfile with prod-only runtime
Jul 12, 2026
54fe4a5
build(admin): add multi-stage dockerfile serving spa via nginx
Jul 12, 2026
d33cd72
build(inventory): add multi-stage dockerfile with static go binary
Jul 12, 2026
1d2109b
build(payment): add multi-stage dockerfile with jre runtime
Jul 12, 2026
1f53198
build: add docker compose stack with nginx single entrypoint
Jul 12, 2026
b59457e
docs: add per-app readmes and compose workflow guide
Jul 12, 2026
efd73a6
docs: record phase 01 implementation decisions
Jul 12, 2026
a985ea3
fix: apply phase 01 code review findings
Jul 12, 2026
37a2ee9
fix(hooks): validate the first -m flag as the commit subject
Jul 12, 2026
cc1e5fb
fix: publish compose postgres on host port 5433
Jul 12, 2026
0b24b0e
fix: use ipv4 loopback in compose healthchecks
Jul 12, 2026
eab9aef
docs: mark phase 01 as done
Jul 12, 2026
7d9b95a
feat: add API Core specification for Phase 2
Jul 12, 2026
a96156a
docs: approve api core spec and add phase 02 checklist
Jul 13, 2026
c82fbbb
docs: mark phase 02 as in progress
Jul 13, 2026
d8a2729
build: add redis service and api environment to compose
Jul 13, 2026
b299e9c
feat(types): add rest api response envelope contracts
Jul 13, 2026
56fc72b
build: publish compose redis on host port 6380
Jul 13, 2026
52a0ec7
feat(api): add prisma schema, migration, seed, and migrate-on-start
Jul 13, 2026
93bb99a
feat(api): add versioning, validation, envelopes, logging, and swagge…
Jul 13, 2026
5a5b37c
docs: check off API foundations in phase 02 checklist
Jul 13, 2026
bda006c
feat(api): add redis cache-aside port and adapter
Jul 13, 2026
1ed5bf0
docs: check off cache infrastructure in phase 02 checklist
Jul 13, 2026
db48e6f
feat(api): add auth module with jwt refresh rotation and rbac
Jul 13, 2026
719348d
docs: check off auth module in phase 02 checklist
Jul 13, 2026
9e1f6d4
feat(api): add authenticated user profile endpoint
Jul 13, 2026
e95041b
docs: check off users module in phase 02 checklist
Jul 13, 2026
e9e795c
feat(api): add categories crud with cache-aside invalidation
Jul 13, 2026
79d3300
docs: check off categories module in phase 02 checklist
Jul 13, 2026
9db6ca2
feat(api): add products catalog with pagination, filtering, and soft …
Jul 13, 2026
a0e81e2
docs: check off products module in phase 02 checklist
Jul 13, 2026
22abf76
test(api): add e2e suite for auth rotation, rbac, catalog, and thrott…
Jul 13, 2026
1c22da4
docs: check off e2e suite in phase 02 checklist
Jul 13, 2026
08a5075
docs(api): document v1 endpoints, envelopes, prisma workflow, and e2e…
Jul 13, 2026
5114275
fix(api): close refresh-token rotation race and other review findings
Jul 13, 2026
1cc6a5d
fix(api): copy built workspace-package dist into the docker runner stage
Jul 13, 2026
3181ed3
docs: mark phase 02 as done
Jul 13, 2026
9d69b6d
docs: add approved spec for phase 3 (storefront)
Jul 13, 2026
cfddbfa
docs: add phase 03 checklist (storefront)
Jul 13, 2026
37302bb
docs: mark phase 03 as in progress
Jul 13, 2026
2cf0c31
build: add API_BASE_URL for the storefront's server-side api client
Jul 13, 2026
b37e48e
feat(api): add order/orderitem prisma models and migration
Jul 13, 2026
09d2a46
feat(api): add orders module with server-side re-pricing
Jul 13, 2026
6e9c9eb
feat(web): add session cookies and typed api data-access layer
Jul 13, 2026
35597b7
feat(ui): add shadcn-based product card, cart badge, and form inputs
Jul 13, 2026
1e034e1
feat(web): add register/login/logout pages and server actions
Jul 13, 2026
4a3fdf2
feat(web): add product catalog listing and detail pages
Jul 13, 2026
74d6318
feat(web): add shopping cart with client-side cookie mutations
Jul 13, 2026
054f12c
feat(web): add checkout flow with server-side order placement
Jul 13, 2026
16583b7
feat(web): add order history pages
Jul 13, 2026
335ec90
test(web): add playwright e2e suite for the storefront
Jul 13, 2026
981ccce
docs(web): document storefront pages, session/cart model, and testing
Jul 13, 2026
95d61ab
refactor: address phase 3 code review findings
Jul 13, 2026
56b9ad9
docs: mark phase 03 as done
Jul 13, 2026
55fc7dc
docs: add approved spec for phase 4 (inventory service)
Jul 13, 2026
d43cb5e
docs: add phase 04 checklist (inventory service)
Jul 13, 2026
a84c0af
docs: mark phase 04 as in progress
Jul 13, 2026
9ad3817
build: wire inventory env vars into compose and .env.example
Jul 13, 2026
406986a
feat(inventory): add project layout, migrations, and migrate command
Jul 13, 2026
064d38b
feat(inventory): add domain entities, ports, and use cases
Jul 13, 2026
38c5ea7
feat(inventory): add postgres, fake, and qstash adapters
Jul 13, 2026
e9f8a4c
feat(http): implement stock management handlers and middleware
Jul 13, 2026
c2fab6c
feat(http): wire stock handlers and qstash consumer into the server
Jul 14, 2026
7f452c0
feat(inventory): add seed command resolving product slugs via the api
Jul 14, 2026
5088639
feat(inventory): run migrate and seed via entrypoint before starting …
Jul 14, 2026
61f5812
test(inventory): add HTTP integration suite proving all phase-4 accep…
Jul 14, 2026
fa5cd5f
docs(inventory): document stock api, qstash integration, and workflows
Jul 14, 2026
3de93f5
fix(inventory): close idempotency race and other review findings
Jul 14, 2026
eab683e
docs: mark phase 04 as done
Jul 14, 2026
c1ef41e
docs: add approved spec for phase 5 (payment service)
Jul 14, 2026
9d3d372
docs: add phase 05 checklist (payment service)
Jul 14, 2026
2d1c552
docs: mark phase 05 as in progress
Jul 14, 2026
1230344
build: wire payment env vars into compose and .env.example
Jul 14, 2026
4052b59
feat(payment): add prisma-equivalent jpa/flyway domain layer
Jul 14, 2026
2b4181e
feat(payment): add ports and use cases with claim-first idempotency
Jul 14, 2026
72cb511
feat(payment): add gateway, event publisher, and signature verifier a…
Jul 14, 2026
57fbb55
feat(payment): wire controllers, webhook handler, and auth filter
Jul 14, 2026
3ea109d
feat(payment): create the database before starting via docker entrypoint
Jul 14, 2026
8c0a4c3
feat(payment): add integration tests for payment processing and valid…
Jul 14, 2026
8046f41
docs: check off payment integration test suite in phase 05 checklist
Jul 15, 2026
1b16010
docs(payment): document payments api, qstash integration, and workflows
Jul 15, 2026
42b5341
fix(payment): close duplicate-order race and defer publish to after-c…
Jul 15, 2026
1cbea94
docs: mark phase 05 as done
Jul 15, 2026
8c07e9d
docs: add and approve phase 06 event-driven integration spec
Jul 15, 2026
724eb7b
docs: mark phase 06 as in progress
Jul 15, 2026
5b5590a
feat(api): add order status transitions and processed-event schema
Jul 15, 2026
0832e2a
feat(api): add EventPublisher port with fake and QStash adapters
Jul 15, 2026
596fa97
feat(api): add ProcessedEventRepository with atomic claim
Jul 15, 2026
618eb61
feat(api): extend OrderRepository with findById and updateStatus
Jul 15, 2026
2c24318
feat(api): publish order.created after creating an order
Jul 15, 2026
0315137
feat(api): add HandlePaymentEventUseCase
Jul 15, 2026
c855842
feat(api): add QStash webhook consumer for payment events
Jul 15, 2026
01030b9
feat(api): wire API_QSTASH_DESTINATION_URL and verify it in signatures
Jul 15, 2026
1b0bae8
test(api): add e2e coverage for event-driven integration
Jul 15, 2026
1ad305f
docs(phase-06): confirm inventory/payment regression check
Jul 15, 2026
2d8ec1e
docs(api): document event-driven integration in README
Jul 15, 2026
fe04f72
fix(api): verify QStash signature before DTO validation runs
Jul 15, 2026
b965ebe
docs: mark phase 06 as done
Jul 15, 2026
c96c3cd
docs: add and approve phase 07 admin panel spec
Jul 15, 2026
4da21eb
docs(phase-07): add admin panel phase details and tasks
Jul 15, 2026
08562ff
docs: mark phase 07 as in progress
Jul 15, 2026
09bf9a5
feat: wire CORS_ORIGINS, INVENTORY_BASE_URL, INVENTORY_INTERNAL_API_KEY
Jul 15, 2026
168412f
feat(api): add ADMIN-only cross-customer order endpoints
Jul 15, 2026
c29e03f
feat(api): add inventory stock proxy and enable CORS
Jul 15, 2026
b8e95bc
test(api): add e2e coverage for admin orders and inventory proxy
Jul 15, 2026
60599d6
chore(admin): add ESLint/angular-eslint and Angular Material
Jul 15, 2026
5e98014
feat(admin): add core auth infrastructure
Jul 15, 2026
acbdb43
feat(admin): add app shell layout and shared components
Jul 15, 2026
ba511bc
feat(admin): add login page
Jul 15, 2026
877ff4c
feat(admin): add dashboard with aggregate counts
Jul 15, 2026
eb3e318
feat(admin): add products management feature
Jul 15, 2026
5e9182b
feat(admin): add categories management feature
Jul 15, 2026
3349ba4
feat(admin): add read-only orders review feature
Jul 15, 2026
00fe760
docs(admin): document routes, auth model, and architecture
Jul 15, 2026
2e90e3c
docs: mark phase 07 as done
Jul 15, 2026
1783a8f
docs: add and approve phase 08 hardening and deployment spec
Jul 15, 2026
692eb1a
docs: mark phase 08 as in progress
Jul 15, 2026
43dc1ef
feat: wire EVENT_PUBLISHER_MODE across backend services
Jul 15, 2026
3a58ac8
feat(inventory): add EVENT_PUBLISHER_MODE toggle and correlation ids
Jul 15, 2026
ddccd64
feat(payment): add EVENT_PUBLISHER_MODE toggle and correlation ids
Jul 15, 2026
f7089fa
feat(api): add EVENT_PUBLISHER_MODE toggle and correlation forwarding
Jul 15, 2026
db3e0aa
ci: add GitHub Actions workflow for build/lint/test
Jul 15, 2026
1601d1e
docs: add Fly.io deployment configuration and guide
Jul 15, 2026
819ebb9
docs: add manual guide for the real cross-service event flow
Jul 15, 2026
107a674
feat: update
Jul 16, 2026
2420e55
feat: update project
Jul 16, 2026
520da07
chore(admin): ignore Playwright test artifacts
Jul 16, 2026
291fad7
docs: final README pass for Phase 8
Jul 16, 2026
593191b
docs: mark phase 08 as done
Jul 16, 2026
7648d61
docs: update language policy and enhance README files with bilingual …
Jul 16, 2026
44f771a
docs: bilingual READMEs for remaining apps and new package docs
Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,813 changes: 1,813 additions & 0 deletions .agents/skills/angular-best-practices/AGENTS.md

Large diffs are not rendered by default.

197 changes: 197 additions & 0 deletions .agents/skills/angular-best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
---
name: angular-best-practices
description: >-
Modern Angular best practices for building performant, maintainable Angular 17+
applications. Covers Signals, RxJS, components, templates, styles, performance,
SSR, testing, forms, routing, accessibility, and architecture — with code examples
and impact ratings for every rule.
Use this skill whenever the user is working on Angular code of any kind: components,
services, templates, stylesheets, routes, tests, or configuration. This applies to
editing .component.ts, .service.ts, .html templates, .scss/.css styles, .spec.ts tests,
.routes.ts files, store files, and any general .ts file in an Angular project.
Look for angular.json, nx.json, or @angular/core imports as project indicators.
Do not use for AngularJS (1.x), React, Vue, or non-Angular TypeScript projects.
version: 1.2.0
author: alfredoperez
tags:
- angular
- typescript
- signals
- performance
- testing
- state-management
- accessibility
globs:
- "**/*.ts"
- "**/*.html"
- "**/*.scss"
- "**/*.css"
- "**/*.component.ts"
- "**/*.service.ts"
- "**/*.spec.ts"
- "**/*.routes.ts"
- "**/*.store.ts"
---

# Modern Angular Best Practices

A comprehensive set of 112 rules covering TypeScript strictness, signal-based reactivity, component architecture, template optimization, RxJS patterns, SSR hydration, bundle optimization, accessibility, routing, forms, testing, and styling — so every component, service, template, and route you build is fast, accessible, tested, and maintainable.

Below are the key patterns organized by what you're working on. For edge cases or when you need specific code examples beyond what's listed here, consult the AGENTS.md reference file in this skill directory.

## Components & Signals

Components are the building blocks. Modern Angular uses signals for reactivity, which changes how you write everything from state to templates.

- Use standalone components with `ChangeDetectionStrategy.OnPush`
- Use `input()`, `output()`, `model()` signal functions instead of decorators
- Use `inject()` instead of constructor injection
- Use `signal()` for local state, `computed()` for derived state
- Use `linkedSignal()` when state should reset when a source changes
- Use `resource()` / `httpResource()` for async data with built-in loading states
- Use `effect()` only for side effects — never for state synchronization
- Use `toSignal()` to bridge RxJS observables into signal-based templates
- Use `viewChild()` / `contentChild()` signal queries instead of decorators
- Use the `host` property instead of `@HostBinding` / `@HostListener`

## Templates & Styles

Templates and styles work together — accessibility, layout, and performance cross both concerns.

- Use `@if`, `@for`, `@switch` control flow instead of structural directives
- Use `@defer` for heavy below-fold content
- Always provide `track` with `@for` loops
- Use `NgOptimizedImage` with `priority` for above-fold images
- Use pure pipes instead of method calls in templates
- Use `CdkVirtualScrollViewport` for large lists
- Use `[class.active]` bindings instead of `[ngClass]`
- Define theme values as CSS custom properties
- Use `prefers-reduced-motion` to respect motion preferences

## Services & RxJS

Services handle data flow, dependency injection, and RxJS patterns. HTTP, caching, and observable lifecycle are interconnected concerns.

- Unsubscribe via `takeUntilDestroyed()` or `async` pipe
- Place `catchError` inside `switchMap` to keep the outer stream alive
- Use `switchMap` for latest-only, `exhaustMap` for ignore-while-busy
- Use `shareReplay({ bufferSize: 1, refCount: true })` for shared streams
- Use `inject()` with `InjectionToken` for configuration
- Use HTTP interceptors for cross-cutting concerns (auth, retry, logging)
- Map DTOs at the API boundary — don't leak backend shapes into components

## Performance & SSR

Performance rules span components, templates, and infrastructure. SSR affects routing, data fetching, and hydration strategy.

- Preload critical data with route resolvers to eliminate waterfalls
- Lazy-load routes and `@defer` heavy views
- Tree-shake imports via standalone component imports, not modules
- Batch DOM reads/writes to avoid layout thrashing
- Use `Map`/`Set` over plain objects/arrays for frequent lookups
- Use incremental hydration (`@defer (hydrate on ...)`) for large pages
- Use `provideClientHydration(withEventReplay())` for SSR
- Set render modes per-route: SSR for SEO, CSR for dashboards

## Testing

Testing patterns apply to components, services, and templates together — isolation is important but integration context matters.

- Use component harnesses over direct DOM queries
- Create test object factories for consistent test data
- Test signal state changes and template output, not implementation
- Mock services with `jasmine.createSpyObj` or `jest.fn()`
- Test accessibility with `axe-core` or `jest-axe`

## Architecture & Routing

Architecture decisions affect every file type — routing, module boundaries, and dependency injection are structural.

- One feature per lazy-loaded route
- Use guards for auth, resolvers for data, `canDeactivate` for unsaved changes
- Use preload strategies (`QuickLinkStrategy`) for likely-next routes
- Bind route params via `input()` with `withComponentInputBinding()`
- Avoid barrel file re-exports — import directly from source
- Use environment-based configuration — no hardcoded URLs or API keys

## TypeScript Foundations

These apply everywhere — components, services, tests, all `.ts` files.

- Use strict type checking with `strict: true` in tsconfig
- Avoid `any`; use `unknown` when type is uncertain, generics to narrow
- Use `import type` for type-only imports
- Add explicit return types to exported functions
- Prefer `readonly` for data that should not be mutated
- Use discriminated unions for state variants
- Use the Result pattern for operations that can fail

## Accessibility

Accessibility spans templates, styles, and components — it's not just an HTML concern.

- Use semantic HTML elements first (`<nav>`, `<main>`, `<button>`)
- Use ARIA roles and `aria-live` regions for dynamic content
- Ensure all interactive elements are keyboard-accessible
- Use `cdkTrapFocus` for dialogs and overlays
- Test with screen readers and `axe-core`

## Quick Reference

| Pattern | Use | Avoid |
|---------|-----|-------|
| Signal inputs | `input<T>()` | `@Input()` |
| Signal outputs | `output<T>()` | `@Output()` |
| Two-way binding | `model<T>()` | input + output pair |
| Dependency injection | `inject()` | Constructor injection |
| Control flow | `@if`, `@for`, `@switch` | `*ngIf`, `*ngFor` |
| Class binding | `[class.active]` | `[ngClass]` |
| Change detection | `OnPush` | Default |
| Derived state | `computed()` | Getters |
| View queries | `viewChild()` | `@ViewChild()` |

## Key Code Patterns

Signal inputs and outputs (replaces decorators):
```typescript
name = input<string>(); // @Input() replacement
save = output<Data>(); // @Output() replacement
value = model<string>(); // two-way binding
```

Control flow (replaces structural directives):
```html
@if (user()) { <profile [user]="user()" /> }
@for (item of items(); track item.id) { <card [item]="item" /> }
@defer (on viewport) { <heavy-chart /> }
```

httpResource and resource (signal-based async):
```typescript
users = httpResource<User[]>(() => `/api/users?role=${this.role()}`);
data = resource({ request: () => this.id(), loader: ({request}) => fetch(request) });
```

## Optional Library Skills

Install library-specific rules alongside this core skill:

| Library | Skill Page |
|---------|------------|
| NgRx | [angular-best-practices-ngrx](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-ngrx) |
| SignalStore | [angular-best-practices-signalstore](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-signalstore) |
| TanStack Query | [angular-best-practices-tanstack](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-tanstack) |
| Angular Material | [angular-best-practices-material](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-material) |
| PrimeNG | [angular-best-practices-primeng](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-primeng) |
| Spartan UI | [angular-best-practices-spartan](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-spartan) |
| Transloco | [angular-best-practices-transloco](https://skills.sh/alfredoperez/angular-best-practices/angular-best-practices-transloco) |

## Links

- [GitHub Repository](https://github.com/alfredoperez/angular-best-practices)
- [Submit a Rule](https://github.com/alfredoperez/angular-best-practices/issues/new) via GitHub Issues
- [Browse All Skills](https://skills.sh/alfredoperez/angular-best-practices)

## License

MIT
23 changes: 23 additions & 0 deletions .agents/skills/angular-best-practices/evals/evals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"skill_name": "angular-best-practices",
"evals": [
{
"id": 1,
"prompt": "I need to create a new Angular component for a user profile page. It should display user info, have an edit form, and show a list of their recent orders. The component needs to fetch the user data from an API and handle loading/error states. Can you create src/app/features/profile/user-profile.component.ts for me?",
"expected_output": "Component using signals (input(), signal(), computed()), inject(), OnPush, resource() or httpResource() for data fetching, proper TypeScript types",
"files": []
},
{
"id": 2,
"prompt": "I have this Angular template that's performing poorly. It has a big list of products with images and filters. Can you review and optimize this template?\n\n```html\n<div *ngIf=\"products$ | async as products\">\n <div *ngFor=\"let product of products\">\n <img src=\"{{product.image}}\" />\n <p>{{getFormattedPrice(product)}}</p>\n <p>{{product.name | uppercase}}</p>\n </div>\n</div>\n```\n\nThis is in src/app/features/catalog/product-list.component.html",
"expected_output": "Template using @if/@for with track, NgOptimizedImage, pure pipe instead of getFormattedPrice method, virtual scrolling suggestion for large lists",
"files": []
},
{
"id": 3,
"prompt": "I need to write unit tests for my Angular OrderService that uses HttpClient and returns observables. The service has methods like getOrders(), createOrder(order), and cancelOrder(id). It also uses an AuthService for getting the auth token. Can you create the spec file at src/app/core/services/order.service.spec.ts?",
"expected_output": "Test file using TestBed, HttpClientTestingModule or provideHttpClientTesting, jasmine.createSpyObj for AuthService mock, proper subscribe/expectOne patterns",
"files": []
}
]
}
Loading
Loading