协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
snapshot-writer【开发与工程】Generate Jest snapshot tests for React components. Use when you need snapshot coverage for your UI components.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Snapshot tests are the fastest way to catch unintended UI changes. But writing them for every component gets tedious fast. This tool reads your React components and generates snapshot tests automatically. It figures out the props, renders the component, and creates the snapshot assertions.
One command. Zero config. Just works.
npx ai-snapshot-test src/components/
# Generate snapshot tests for all components
npx ai-snapshot-test src/components/
# Target a specific component
npx ai-snapshot-test src/components/Button.tsx
# Scan all TSX files in a directory
npx ai-snapshot-test "src/**/*.tsx"
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
No install needed. Just run with npx. Node.js 18+ recommended.
npx ai-snapshot-test --help
The tool parses your React component files to extract the component signature, props interface, and any dependencies. It then generates test files that import the component, render it with various prop combinations, and create toMatchSnapshot assertions. The output is compatible with Jest's snapshot testing.
MIT. Free forever. Use it however you want.