Back to Skills

testing-deployment-implementation

verified

Write unit tests for components and services, implement E2E tests with Cypress, set up test mocks, optimize production builds, configure CI/CD pipelines, and deploy to production platforms.

View on GitHub

Marketplace

pluginagentmarketplace-angular

pluginagentmarketplace/custom-plugin-angular

Plugin

angular-development-assistant

Repository

Last Verified

January 16, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-angular/blob/main/skills/testing/SKILL.md -a claude-code --skill testing-deployment-implementation

Installation paths:

Claude
.claude/skills/testing-deployment-implementation/
Powered by add-skill CLI

Instructions

# Testing & Deployment Implementation Skill

## Unit Testing Basics

### TestBed Setup
```typescript
import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';

describe('UserService', () => {
  let service: UserService;
  let httpMock: HttpTestingController;

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [HttpClientTestingModule],
      providers: [UserService]
    });

    service = TestBed.inject(UserService);
    httpMock = TestBed.inject(HttpTestingController);
  });

  afterEach(() => {
    httpMock.verify();
  });
});
```

### Component Testing
```typescript
describe('UserListComponent', () => {
  let component: UserListComponent;
  let fixture: ComponentFixture<UserListComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [UserListComponent],
      imports: [CommonModule, HttpClientTestingModule],
      providers: [UserService]
    }).compileComponents();

    fixture = TestBed.createComponent(UserListComponent);
    component = fixture.componentInstance;
  });

  it('should display users', () => {
    const mockUsers: User[] = [
      { id: 1, name: 'John' },
      { id: 2, name: 'Jane' }
    ];

    component.users = mockUsers;
    fixture.detectChanges();

    const compiled = fixture.nativeElement as HTMLElement;
    const userElements = compiled.querySelectorAll('.user-item');
    expect(userElements.length).toBe(2);
  });

  it('should call service on init', () => {
    const userService = TestBed.inject(UserService);
    spyOn(userService, 'getUsers').and.returnValue(of([]));

    component.ngOnInit();

    expect(userService.getUsers).toHaveBeenCalled();
  });
});
```

### Testing Async Operations
```typescript
// Using fakeAsync and tick
it('should load users after delay', fakeAsync(() => {
  const userService = TestBed.inject(UserService);
  spyOn(userService, 'getUsers').and.returnValue(
 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9099 chars

Issues Found:

  • name_directory_mismatch