RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/miguelslemos/stock_portfolio

Cursor rule

.cursor/rules/testing.mdc

Testing patterns and practices

Cursor rules

Quality

62/100

Scores the file, not the repository.

Length

170 words

5 headings · 1 code blocks

Repository

40

— · pushed 120 days ago

Last changed

3 days ago

First indexed 3 days ago.
miguelslemos/stock_portfolio/.cursor/rules/testing.mdcRawGitHub
1---
2description: Testing patterns and practices
3globs: web/src/**/__tests__/**/*.test.ts
4alwaysApply: false
5---
6 
7# Testing
8 
9## Setup
10 
11- Framework: Vitest 4 with V8 coverage
12- Convention: `__tests__/ClassName.test.ts` alongside the source code
13- `@/` alias available in tests
14 
15## Test Structure
16 
17```typescript
18describe('Money', () => {
19 describe('add', () => {
20 it('should sum amounts with same currency', () => {
21 const a = new Money(100, 'USD');
22 const b = new Money(50, 'USD');
23 expect(a.add(b).amount).toBe(150);
24 });
25 
26 it('should throw on currency mismatch', () => {
27 const usd = new Money(100, 'USD');
28 const brl = new Money(50, 'BRL');
29 expect(() => usd.add(brl)).toThrow('Currency mismatch');
30 });
31 });
32});
33```
34 
35## Testing Priorities
36 
371. **Domain entities and services**: maximum coverage (business logic)
382. **Use cases**: test orchestration with mocked interfaces
393. **Infrastructure**: test parsing and integration in isolation
404. **Presentation**: test formatters; builders are visual (lower priority)
41 
42## Best Practices
43 
44- Independent tests — no shared state between `it()` blocks
45- Descriptive names: "should calculate average cost when multiple vestings exist"
46- Use factories or builders to create test data
47- Mock interfaces (`IOperationRepository`) — never concrete implementations
48- No `any` in tests
49 

Sections

  • Testing
  • Setup
  • Test Structure
  • Testing Priorities
  • Best Practices

What it covers

setuptestcode-stylearchitecturetesting-strategy

Stack — with the evidence

typescript

(1.00)

vite

(1.00)

vitest

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

tailwind

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • web/src/**/__tests__/**/*.test.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
miguelslemos
Language
—
License
—
Archived
no

All configs in this repo

Also in miguelslemos/stock_portfolio

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
miguelslemos/stock_portfolio.cursor/rules/architecture.mdc · 40Cursor rulestypescriptvite+7styledependencies48/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/code-style.mdc · 40Cursor rulestypescriptvite+7lint-formatstyletypesdo-not+165/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/domain-logic.mdc · 40Cursor rulestypescriptvite+7do-not57/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/new-features.mdc · 40Cursor rulestypescriptvite+7styledo-not61/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/project-overview.mdc · 40Cursor rulestypescriptvite+7testlint-formatarchdo-not72/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/ui-presentation.mdc · 40Cursor rulestypescriptvite+7ui50/1003 days ago
Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/code-style.mdc Diff against .cursor/rules/domain-logic.mdc Diff against .cursor/rules/new-features.mdc Diff against .cursor/rules/project-overview.mdc Diff against .cursor/rules/ui-presentation.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack