Index of every page on this site: llms.txt
All skills
abiramcodes avatar

/angular-developer

@5863679
by Abiramabiramcodes/ng-point9 stars
Run it yourself

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), queries and content projection, forms, dependency injection, routing, server and hybrid rendering (SSR, prerendering, hydration), accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, naming conventions, or CLI tooling.

  • 45 files
  • 180.7 KB
  • MIT
  • Updated 2 days ago
  • GitHub
Use this Skill: https://skilld.dev/gh/abiramcodes/ng-point/angular-developer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestesting-fundamentals.md

≈703 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Testing Fundamentals

This guide covers the fundamental principles and practices for writing unit tests in this repository, which uses Vitest as the test runner.

Core Philosophy: Zoneless & Async-First

This project follows a modern, zoneless testing approach. State changes schedule updates asynchronously, and tests must account for this.

Do NOT use fixture.detectChanges() to manually trigger updates. Do NOT use fixture.changeDetectorRef.markForCheck() either: it marks only the host view and does not refresh the template of OnPush components (the default). Update state through signals, inputs, or DOM events instead. ALWAYS use the "Act, Wait, Assert" pattern:

  1. Act: Update state or perform an action (e.g., set a component input, click a button).
  2. Wait: Use await fixture.whenStable() to allow the framework to process the scheduled update and render the changes.
  3. Assert: Verify the outcome.

Basic Test Structure Example

import {ComponentFixture, TestBed} from '@angular/core/testing';
import {MyComponent} from './my.component';

describe('MyComponent', () => {
  let component: MyComponent;
  let fixture: ComponentFixture<MyComponent>;
  let h1: HTMLElement;

  beforeEach(() => {
    TestBed.configureTestingModule({});

    // Create the component fixture
    fixture = TestBed.createComponent(MyComponent);
    component = fixture.componentInstance;
    h1 = fixture.nativeElement.querySelector('h1');
  });

  it('should display the default title', async () => {
    // ACT: (Implicit) Component is created with default state.
    // WAIT for initial data binding.
    await fixture.whenStable();
    // ASSERT the initial state.
    expect(h1.textContent).toContain('Default Title');
  });

  it('should display a different title after a change', async () => {
    // ACT: Change the component's title property.
    component.title.set('New Test Title');

    // WAIT for the asynchronous update to complete.
    await fixture.whenStable();

    // ASSERT the DOM has been updated.
    expect(h1.textContent).toContain('New Test Title');
  });
});

TestBed and ComponentFixture

  • TestBed: The primary utility for creating a test-specific Angular module. Use TestBed.configureTestingModule({...}) in your beforeEach to declare components, provide services, and set up imports needed for your test.
  • ComponentFixture: A handle on the created component instance and its environment.
    • fixture.componentInstance: Access the component's class instance.
    • fixture.nativeElement: Access the component's root DOM element.
    • fixture.debugElement: An Angular-specific wrapper around the nativeElement that provides safer, platform-agnostic ways to query the DOM (e.g., debugElement.query(By.css('p'))).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 5863679. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 10 hours ago.

Activeupdated 2 days ago
Other metadata
metadata
{
  "author": "Copyright 2026 Google LLC",
  "version": "1.0",
  "internal": true
}

README badge

README badge for abiramcodes/ng-point/angular-developer