tdd-workflows-tdd-red by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill tdd-workflows-tdd-red编写遵循 TDD 红阶段原则的全面失败测试。
[扩展思考:使用 test-automator 代理生成能正确定义预期行为的失败测试。]
使用 Task 工具并设置 subagent_type="unit-testing::test-automator" 来生成失败测试。
"为以下内容生成全面的失败测试:$ARGUMENTS
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
JavaScript/TypeScript (Jest/Vitest)
vi.fn() 或 jest.fn() 模拟依赖@testing-libraryfast-check 进行属性测试Python (pytest)
Go
t.Parallel() 进行并行执行testify/assert 进行更清晰的断言Ruby (RSpec)
let 进行惰性加载,let! 进行急切加载生成后:
// auth.service.test.ts
describe('AuthService', () => {
let authService: AuthService;
let mockUserRepo: jest.Mocked<UserRepository>;
beforeEach(() => {
mockUserRepo = { findByEmail: jest.fn() } as any;
authService = new AuthService(mockUserRepo);
});
it('should_return_token_when_valid_credentials', async () => {
const user = { id: '1', email: 'test@example.com', passwordHash: 'hashed' };
mockUserRepo.findByEmail.mockResolvedValue(user);
const result = await authService.authenticate('test@example.com', 'pass');
expect(result.success).toBe(true);
expect(result.token).toBeDefined();
});
it('should_fail_when_user_not_found', async () => {
mockUserRepo.findByEmail.mockResolvedValue(null);
const result = await authService.authenticate('none@example.com', 'pass');
expect(result.success).toBe(false);
expect(result.error).toBe('INVALID_CREDENTIALS');
});
});
测试要求:$ARGUMENTS
每周安装量
104
代码仓库
GitHub 星标数
27.1K
首次出现
2026年1月28日
安全审计
已安装于
opencode99
gemini-cli98
codex95
github-copilot94
cursor89
antigravity88
Write comprehensive failing tests following TDD red phase principles.
[Extended thinking: Generates failing tests that properly define expected behavior using test-automator agent.]
Generate failing tests using Task tool with subagent_type="unit-testing::test-automator".
"Generate comprehensive FAILING tests for: $ARGUMENTS
Test Structure
Behavior Coverage
Failure Verification
Test Categories
JavaScript/TypeScript (Jest/Vitest)
vi.fn() or jest.fn()@testing-library for React componentsfast-checkPython (pytest)
Go
t.Parallel() for parallel executiontestify/assert for cleaner assertionsRuby (RSpec)
let for lazy loading, let! for eagerAfter generation:
// auth.service.test.ts
describe('AuthService', () => {
let authService: AuthService;
let mockUserRepo: jest.Mocked<UserRepository>;
beforeEach(() => {
mockUserRepo = { findByEmail: jest.fn() } as any;
authService = new AuthService(mockUserRepo);
});
it('should_return_token_when_valid_credentials', async () => {
const user = { id: '1', email: 'test@example.com', passwordHash: 'hashed' };
mockUserRepo.findByEmail.mockResolvedValue(user);
const result = await authService.authenticate('test@example.com', 'pass');
expect(result.success).toBe(true);
expect(result.token).toBeDefined();
});
it('should_fail_when_user_not_found', async () => {
mockUserRepo.findByEmail.mockResolvedValue(null);
const result = await authService.authenticate('none@example.com', 'pass');
expect(result.success).toBe(false);
expect(result.error).toBe('INVALID_CREDENTIALS');
});
});
Test requirements: $ARGUMENTS
Weekly Installs
104
Repository
GitHub Stars
27.1K
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode99
gemini-cli98
codex95
github-copilot94
cursor89
antigravity88
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
157,400 周安装