RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Copilot instructions/AndreasKarz/Vibe-Coding-Dev-Setup

Copilot instructions

.github/instructions/tests.instructions.md
Copilot instructions

Quality

63/100

Scores the file, not the repository.

Length

348 words

8 headings · 0 code blocks

Repository

7

— · pushed 172 days ago

Last changed

3 days ago

First indexed 3 days ago.
AndreasKarz/Vibe-Coding-Dev-Setup/.github/instructions/tests.instructions.mdRawGitHub
1---
2applyTo: "**/test/**/*Tests.cs"
3---
4 
5# General Guidelines
6- Use these frameworks: xUnit, Moq, FluentAssertions (existing tests), xUnit Asserts (new tests).
7- For unit tests on Repository classes, use Squadron to create a MongoDB.
8- If there are more than 5 asserts to do on a result, use Snapshooter instead.
9- Use Theories instead of multiple tests.
10- Never use [MemberData].
11 
12# Test Naming Conventions
13- Test class names should end with "Tests" (e.g., UserServiceTests)
14- Test method names should follow the pattern: MethodName_Scenario_ExpectedBehavior
15- Use descriptive names that clearly indicate what is being tested
16- Name the result in the Act part either `result` or `act` when testing for exceptions.
17 
18# Test Data and Setup
19- Mocks:
20 Define as fields and instantiate directly if possible
21 Pre-configure default behaviour in the constructor when appropriate
22 Use MockBehavior.Strict as default
23- Instantiate the class under test in the constructor of the test class
24- Avoid creating the same test data repeatedly. Instead, use sample data classes.
25- When using Squadron, ensure to re-use the instance by creating a collection fixture
26 
27# Test Structure
28- Follow Arrange-Act-Assert (AAA) pattern in all tests
29- Use separate lines or comments to clearly delineate AAA sections
30- Keep tests focused on a single behavior or scenario
31- Having no or few lines in the Arrange section is preferred.
32 
33# Assertions
34- Use FluentAssertions for consistency reasons for existing tests
35- Use xUnit Asserts in new tests
36 
37# Snapshot Testing
38- Use Snapshooter when testing complex objects with many properties
39- Update snapshots deliberately when behavior changes are intended
40- Review snapshot changes carefully during code reviews
41 
42# Mocking and Dependencies
43- Use clear, descriptive variable names for mocks
44- Avoid defining mocks inside the test method when possible.
45- Verify mock interactions when behavior verification is important
46- When verifying mock interactions, avoid using It.IsAny<T>() if a more specific constraint can be used
47 
48# Error Handling and Exception Testing
49- Test both happy path and error scenarios
50- Use FluentAssertions for exception testing: .Should().ThrowExactly[Async]<ExceptionType>()
51- Verify exception messages and properties when relevant
52- Test error propagation in service layers
53 

Sections

  • General Guidelines
  • Test Naming Conventions
  • Test Data and Setup
  • Test Structure
  • Assertions
  • Snapshot Testing
  • Mocking and Dependencies
  • Error Handling and Exception Testing

What it covers

setuptestcode-stylearchitecturetesting-strategydependenciesdo-not

Stack — with the evidence

javascript

(1.00)

csharp

(0.90)

Glob targeting

  • **/test/**/*Tests.cs

Format

Copilot instructions

Two layers: one always-on repo file, plus optional glob-scoped instruction files. Lives under .github/ rather than the repo root, which is the tell that it is aimed at the GitHub platform surface as much as the editor.

What the corpus says about it

Repository

Owner
AndreasKarz
Language
—
License
—
Archived
no

All configs in this repo

Also in AndreasKarz/Vibe-Coding-Dev-Setup

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
AndreasKarz/Vibe-Coding-Dev-Setup.github/AGENTS.md · 7AGENTS.mdjavascriptcsharpstylegitagent-behaviour66/1003 days ago
AndreasKarz/Vibe-Coding-Dev-Setup.github/instructions/general.instructions.md · 7Copilot instructionsjavascriptcsharpstylearchapido-not77/1003 days ago
AndreasKarz/Vibe-Coding-Dev-Setup.github/instructions/graphql.instructions.md · 7Copilot instructionsjavascriptcsharptypesapido-not57/1003 days ago
AndreasKarz/Vibe-Coding-Dev-Setup.github/instructions/worker.instructions.md · 7Copilot instructionsjavascriptcsharpdependenciesdo-not51/1003 days ago
Diff against .github/AGENTS.md Diff against .github/instructions/general.instructions.md Diff against .github/instructions/graphql.instructions.md Diff against .github/instructions/worker.instructions.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63Copilot instructionstypescriptreact+7buildlint-formatstylearch+4100/1003 days ago
louislam/uptime-kuma.github/copilot-instructions.md · 90kCopilot instructionstypescriptjavascript+10setupbuildtestlint-format+9100/1003 days ago
HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17Copilot instructionsnodejavascriptsetupbuildtestlint-format+7100/1003 days ago
dotnet/roslyn.github/instructions/Compiler.instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+399/1003 days ago
JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31kCopilot instructionstypescriptnode+7buildlint-formatstylearch+397/1002 days ago
dotnet/roslyn.github/copilot-instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+397/1003 days ago
bagisto/bagisto.github/copilot-instructions.md · 28kCopilot instructionsphplaravel+8setupbuildteststyle+597/1003 days ago
darkmatter/nixmac.github/copilot-instructions.md · 24Copilot instructionstypescriptrust+14setupbuildtestlint-format+896/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