Điểm qua goldbergyoni/golden-testing-rules-for-ai: 44 sao trên GitHub. Instructions for LLMs on how to produce great tests with best practices inside
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
As coding shifts toward AI agents, test quality becomes 100x more critical. In 60 seconds, shield your tests from 50+ common mistakes that AI coding tools make
Download one rule file today and watch your project naturally shift toward more reliable, maintainable testing
🎯 What You'll Find Here
📚 Battle-tested wisdom from 20+ years of testing literature - Curated best practices from the most influential testing books of the last two decades
🤖 AI-optimized format - Specifically formatted for Claude, Cursor, Copilot, and other AI coding assistants to understand and apply
⚡ Context-window friendly - Smartly compacted rules that maximize value while minimizing token usage
🚀 Get Started in 30 Seconds
A. Use this option for standard testing like integration, component, or unit tests (e.g., Vitest, Playwright, Storybook, testing library, Jest, Node.js test runner):
# Download the testing best practices
curl -O https://raw.githubusercontent.com/goldbergyoni/golden-testing-rules-for-ai/main/testing-best-practices.md
Or view and copy the rules directly from GitHub
B. Use this option for the sole purpose of system-wide end-to-end tests (e.g., Playwright/Cypress without a mocked backend):
# Download the end-to-end testing best practices
curl -O https://raw.githubusercontent.com/goldbergyoni/golden-testing-rules-for-ai/main/e2e-testing-best-practices.md
Or view the E2E rules directly from GitHub
Why system-wide E2E testing has different rules? These tests span multiple processes and components, making them more complex and slower than isolated tests. Due to their distributed nature, they require relaxed readability standards and different test data approaches
Integration with your AI tool:
For Claude Code:
Rename the file to CLAUDE.md and place it under your testing folder or wherever you use to locate testing best practices
For Cursor:
Paste the contents into a .cursorrules file in your project root
Note: Currently available for TypeScript/JavaScript. Support for more languages and tool-specific formats coming soon!
That's it! Your AI assistant now follows golden testing standards. 🛡️
📖 Example: Spot the Difference
❌ Typical AI-Generated Test (3 Critical Issues)
// BAD: Vague title, no clear scenario
test('should work correctly', async () => {
// Missing Arrange phase - no data setup visible
// Implementation detail testing
const service = new OrderService()
expect(service.internalCache).toBeDefined()
// Arbitrary timeout - flaky test waiting
await page.waitForTimeout(2000)
const result = await service.processOrder()
// Missing smoking gun - where's the test data?
expect(result.total).toBe(150)
})
✅ With Golden Testing Rules Applied
test('When processing order items, then total reflects sum plus tax', async () => {
// Arrange - all data visible (🔫 Smoking gun principle)
const order1 = buildOrderItem({ price: 50, quantity: 1 })
const order2 = buildOrderItem({ price: 25, quantity: 1 })
// Act
const result = await httpClient.post('/order/process', [order1, order2])
// Assert - clear cause and effect
expect(result.total).toBe((order1.price + order2.price) * config.taxRate)
})
📚 Standing on the Shoulders of Giants
Our rules are distilled from decades of testing wisdom:
xUnit Test Patterns by Gerard Meszaros
The definitive catalog of test patterns and anti-patterns. Meszaros identifies 400+ patterns that form the foundation of modern testing practices.
Growing Object-Oriented Software, Guided by Tests by Freeman & Pryce
The GOOS book pioneered the London School of TDD and introduced the concept of testing from the outside-in, focusing on behavior over implementation.
Test Driven Development: By Example by Kent Beck
Beck's seminal work introduced TDD to the world, establishing the Red-Green-Refactor cycle and the principle of writing tests first.
The Art of Unit Testing by Roy Osherove
Osherove's practical guide teaches the difference between good and bad tests, emphasizing maintainability, readability, and trustworthiness.
JavaScript Testing Best Practices by Yoni Goldberg
A comprehensive guide with 50+ best practices specifically for JavaScript testing, battle-tested by thousands of developers. 25,000+ ⭐ on GitHub
🎓 Why This Matters
AI coding assistants are powerful but often generate tests with subtle issues:
Hidden dependencies that make tests fragile
Implementation testing instead of behavior testing
Missing test data that makes failures hard to debug
Arbitrary waits that create flaky tests
Poor structure that hurts maintainability
Our rules teach AI to avoid these pitfalls automatically.
🤝 Contributing
Found a testing anti-pattern that AI tools keep generating? Open an issue or PR! We're building the definitive resource for AI-powered testing excellence.
📜 License
MIT - Use these rules freely in your projects
👨💻 About the Author
Yoni Goldberg - Developer and consultant with extensive experience in testing excellence. Has worked with over 40 organizations to improve their testing practices. Author of Node.js and JavaScript testing best practices repositories with a combined 130,000+ GitHub stars 🌟, helping developers worldwide write better, more maintainable tests.
Making AI coding assistants write tests like seasoned testing experts, one rule at a time.
Đọc thêm về goldbergyoni/golden-testing-rules-for-ai ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/goldbergyoni/golden-testing-rules-for-ai là nguồn chính thức.
goldbergyoni/golden-testing-rules-for-ai có bao nhiêu sao?
goldbergyoni/golden-testing-rules-for-ai có 44 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/goldbergyoni/golden-testing-rules-for-ai. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
goldbergyoni/golden-testing-rules-for-ai có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho goldbergyoni/golden-testing-rules-for-ai. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
goldbergyoni/golden-testing-rules-for-ai có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho goldbergyoni/golden-testing-rules-for-ai. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
goldbergyoni/golden-testing-rules-for-ai còn đang phát triển không?
Commit gần nhất trên goldbergyoni/golden-testing-rules-for-ai là 10 tháng trước (theo timestamp GitHub). Repo có 1 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
goldbergyoni/golden-testing-rules-for-ai dùng license gì?
goldbergyoni/golden-testing-rules-for-ai phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
goldbergyoni/golden-testing-rules-for-ai viết bằng ngôn ngữ gì?
Dữ liệu TopGit chưa ghi nhận ngôn ngữ chính cho goldbergyoni/golden-testing-rules-for-ai. Xem danh sách file trên GitHub để biết chi tiết.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về golden-testing-rules-for-ai?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về golden-testing-rules-for-ai.