testing Cursor ruleA

testing from thedaviddias/llms-txt-hub is a Cursor rule: instructions the Cursor agent follows in that repo.

Install it, pinned
mdr add thedaviddias/llms-txt-hub/.cursor/rules/testing.mdc@git:20250301.62fad3c

Pins git:20250301.62fad3c in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
Cursor rule
Repository
thedaviddias/llms-txt-hub
Path
.cursor/rules/testing.mdc
Versions recorded
1
Latest version
git:20250301.62fad3c, committed Mar 1, 2025
Size
4,883 bytes
Repository stars
914
License
a license file GitHub does not identify

Rules for writing Jest tests in TypeScript.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Jest Testing Guidelines

## File Organization

- Place tests next to the file being tested with `.test.ts(x)` extension
- Or use `__tests__` directory in the same folder as the tested file
- Match the folder structure of the source code

## Test Setup

### Custom Test Renderer

Always use the custom test renderer to ensure consistent provider wrapping and test utilities located in test/test-utils.tsx

```

// Re-export everything
export * from '@testing-library/react'
export { render }
```

Usage in tests:
```typescript
import { render, screen } from '@/test/test-utils'

describe('Component', () => {
  it('should render correctly', () => {
    render(<Component />)
    // ... rest of test
  })
})
```

## Test Structure

Follow this structure for all tests:

```typescript
describe('ComponentName or FunctionName', () => {
  describe('specific functionality or scenario', () => {
    it('should describe expected behavior', () => {
      // Arrange
      // Act
      // Assert
    })
  })
})
```

### Example of Good Test Structure

```typescript
// Good: Clear structure and naming
describe('useAuth', () => {
  describe('when user logs in', () => {
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add thedaviddias/llms-txt-hub/.cursor/rules/testing.mdc@sha256:b8856a5274b6ac8d

The line at the top of this page pins the label git:20250301.62fad3c, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_entdkgqow5skrezr.svg)](https://markdownregistry.com/a/art_entdkgqow5skrezr)

5 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Mar 1, 2025.

versioncommittedcommitsizeaudit
git:20250301.62fad3c latest2025-03-01 62fad3c 4,883 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (4883 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

thedaviddias/llms-txt-hub · 914 stars · license a license file GitHub does not identify · pushed 2026-10-20 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_entdkgqow5skrezr
GET https://markdownregistry.com/api/v1/resolve?ref=thedaviddias/llms-txt-hub/.cursor/rules/testing.mdc
GET https://markdownregistry.com/api/v1/blob/b8856a5274b6ac8d4b53fa666670bd5533e267ee905472e6a69e9b2755baf93e

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: Cursor rules vs AGENTS.md · which agent file does what.

More from thedaviddias/llms-txt-hub

design-system Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/design-system.mdc · UI Best Practices
git:20250224.001a864 · audit A · 914 stars
functions Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/functions.mdc · Rules for writing TypeScript functions
git:20250224.001a864 · audit A · 914 stars
jsdoc-comments Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/jsdoc-comments.mdc · add jsdoc comments to components and methods
git:20250224.001a864 · audit A · 914 stars
nextjs Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/nextjs.mdc · Best Practices for Next.js with App Router
git:20250301.62fad3c · audit A · 914 stars
rules Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/rules.mdc · Rules for placing and organizing Cursor rule files in the repository.
git:20250224.001a864 · audit A · 914 stars
shared Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/shared.mdc · Shared rules accross all packages
git:20250301.62fad3c · audit A · 914 stars
website Cursor rule
thedaviddias/llms-txt-hub · .cursor/rules/website.mdc · Rules for the main website
git:20250301.62fad3c · audit A · 914 stars
.cursorrules Cursor rule
thedaviddias/llms-txt-hub · .cursorrules
git:20250224.001a864 · audit A · 914 stars
AGENTS.md AGENTS.md file
thedaviddias/llms-txt-hub · AGENTS.md
git:20260327.45fe3d1 · audit B · 914 stars
CLAUDE.md CLAUDE.md file
thedaviddias/llms-txt-hub · CLAUDE.md
git:20260213.28e904e · audit A · 914 stars
llms-full.txt@packages/content/data/unofficial/embla-carousel llms.txt file
thedaviddias/llms-txt-hub · packages/content/data/unofficial/embla-carousel/llms-full.txt
git:20250402.df85aa1 · audit B · 914 stars
llms.txt@packages/content/data/unofficial/embla-carousel llms.txt file
thedaviddias/llms-txt-hub · packages/content/data/unofficial/embla-carousel/llms.txt
git:20250402.df85aa1 · audit A · 914 stars

Every file in thedaviddias/llms-txt-hub

Other files named testing

testing SKILL.md skill
garrytan/gbrain · skills/testing/SKILL.md · Skill validation framework PLUS daily test-suite health and regression intelligence. Validates skill conformance…
v1.1.0 · audit A · 31,074 stars
testing SKILL.md skill
davepoon/buildwithclaude · plugins/cc-best/skills/testing/SKILL.md · Testing strategies and methodologies including TDD, E2E testing, and multi-framework support
git:20260307.6b5172a · audit A · 3,660 stars
testing SKILL.md skill
live-codes/livecodes · .agents/skills/livecodes/testing/SKILL.md · Write and run automated tests with Jest and Testing Library in the browser. Import code from script editor, use watch…
git:20260914.daf8be4 · audit A · 1,521 stars
testing SKILL.md skill
oliver-kriska/claude-elixir-phoenix · targets/codex/skills/testing/SKILL.md · Write or repair Elixir tests with ExUnit, sandbox isolation, async; Use
git:20260724.daea640 · audit A · 569 stars
testing SKILL.md skill
oliver-kriska/claude-elixir-phoenix · plugins/elixir-phoenix/skills/testing/SKILL.md · Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability, Mox, ExMachina, and LiveViewTest. Use…
git:20260724.daea640 · audit A · 569 stars
testing SKILL.md skill
oliver-kriska/claude-elixir-phoenix · targets/amp/skills/testing/SKILL.md · Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability,
git:20260724.daea640 · audit A · 569 stars
testing Cursor rule
autonomous-ai/lampos · .cursor/rules/testing.mdc · Testing conventions
git:20260324.7a91f3b · audit A · 483 stars
testing Cursor rule
autonomous-ai/physical-ai-operating-system · .cursor/rules/testing.mdc · Testing conventions
git:20260324.7a91f3b · audit A · 479 stars

Browse by kind, by grade A, or by owner.