Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/JrPribs/SmarterStarternpx agentmods add rules/jrpribs/smarterstarter/800-angular-testingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/jrpribs/smarterstarter/800-angular-testing)<a href="https://agentmods.dev/rules/jrpribs/smarterstarter/800-angular-testing"><img src="https://agentmods.dev/badge/rules/jrpribs/smarterstarter/800-angular-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/jrpribs/smarterstarter/800-angular-testing"><img src="https://agentmods.dev/badge/rules/jrpribs/smarterstarter/800-angular-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00004 | $0.02865 |
| Opus 5.5 | $0.00002 | $0.01146 |
| Sonnet 5.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 2mo ago.
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.
- 2mo ago 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.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
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
gonavi-go
A Go coding rule set for the GoNavi repository, based on common Go style guides and the project's own conventions. It covers file structure, errors, context, concurrency, logging, and tests.
python-general-coding-standards
A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.
mockito
This guide provides definitive best practices for writing robust, maintainable, and readable unit tests using Mockito with JUnit 5, focusing on modern patterns and common pitfalls.
spec-for-ut
Unit testing is essential to ensure the reliability and stability of code, especially for React components and functions. Adhering to best practices and ensuring high test coverage is critical to maintaining a robust codebase.
unit-testing-standards
Cursor rule "unit-testing-standards" from adobecom/da-express-milo, covering unit testing standards, testing philosophy, testing framework stack, test structure patterns and 1. standard test file organization.