Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/jrpribs/smarterstarter/800-angular-testinggit clone --depth 1 https://github.com/JrPribs/SmarterStarterWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00004 | $0.02865 |
| Opus 5 | $0.00002 | $0.01432 |
| Sonnet 5 | $0.00001 | $0.00573 |
| Haiku 4.5 | $0.00000 | $0.00286 |
Grade A, and why
800-angular-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 444 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Angular Testing Best Practices
- Component Testing Setup: Use TestBed to configure the test environment for components.
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { HeroDetailComponent } from './hero-detail.component';
import { HeroService } from '../hero.service';
import { of } from 'rxjs';
describe('HeroDetailComponent', () => {
let component: HeroDetailComponent;
let fixture: ComponentFixture<HeroDetailComponent>;
let mockHeroService: jasmine.SpyObj<HeroService>;
beforeEach(() => {
mockHeroService = jasmine.createSpyObj(['getHero', 'updateHero']);
TestBed.configureTestingModule({
imports: [HeroDetailComponent], // For standalone component
providers: [
{ provide: HeroService, useValue: mockHeroService }
]
});
fixture = TestBed.createComponent(HeroDetailComponent);
component = fixture.componentInstance;
});
it('should create', () => {
expect(component).toBeTruthy();
});
// More tests...
});
- Testing Signal Inputs: Test signal inputs by directly setting them.
it('should display hero name', () => {
// Arrange
const testHero = { id: 1, name: 'SuperDude' };
component.hero.set(testHero); // Set the signal input directly
// Act
fixture.detectChanges();
// Assert
const nameElement = fixture.debugElement.query(By.css('h2'));
expect(nameElement.nativeElement.textContent).toContain('SUPERDUDE');
});
- Testing Computed Values: Test computed values and their reactivity.
it('should compute full name correctly', () => {
// Arrange
component.firstName.set('John');
component.lastName.set('Doe');
// Assert
expect(component.fullName()).toBe('John Doe');
// Act - update a dependency
component.firstName.set('Jane');
// Assert - computed value should update
expect(component.fullName()).toBe('Jane Doe');
});
- Testing Effects: Test that effects perform the expected actions when signals change.
it('should load user data when userId changes', fakeAsync(() => {
// Arrange
const testUser = { id: '123', name: 'Test User' };
mockUserService.getUser.and.returnValue(Promise.resolve(testUser));
// Act - trigger the effect by setting userId
component.userId.set('123');
tick(); // Process the async operation
// Assert
expect(mockUserService.getUser).toHaveBeenCalledWith('123');
expect(component.user()).toEqual(testUser);
}));
- Testing Template Interaction: Test user interactions with the component.
it('should call save method when save button is clicked', () => {
// Arrange
spyOn(component, 'save');
const testHero = { id: 1, name: 'SuperDude' };
component.hero.set(testHero);
fixture.detectChanges();
// Act
const saveButton = fixture.debugElement.query(By.css('button.save'));
saveButton.triggerEventHandler('click', null);
// Assert
expect(component.save).toHaveBeenCalled();
});
- Testing Outputs: Test that outputs emit the expected values.
it('should emit heroChange when save is called', () => {
// Arrange
const testHero = { id: 1, name: 'SuperDude' };
component.hero.set(testHero);
let emittedHero: Hero | undefined;
component.heroChange.subscribe((hero: Hero) => emittedHero = hero);
// Act
component.save();
// Assert
expect(emittedHero).toEqual(testHero);
});
- Testing Router Integration: Test components that interact with the router.
import { RouterTestingHarness } from '@angular/router/testing';
it('should load hero details based on route parameter', async () => {
// Arrange
const testHero = { id: 42, name: 'Test Hero' };
mockHeroService.getHero.and.returnValue(of(testHero));
// Create router testing harness
const harness = await RouterTestingHarness.create();
// Act - navigate to route with parameter
await harness.navigateByUrl('/heroes/42');
// Get the instantiated component
const component = await harness.getComponentInstance<HeroDetailComponent>();
// Assert
expect(component.id()).toBe('42'); // Input binding should work
expect(mockHeroService.getHero).toHaveBeenCalledWith(42);
expect(component.hero()).toEqual(testHero);
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 444 lines · 4 tokens per session scan A 471f36b2d504
800-angular-testing is a cursor rule published in the GitHub repository JrPribs/SmarterStarter (2 stars, last pushed 1y ago), licensed MIT. It adds 4 tokens to every session and 2,865 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.