JavaScript Prompts Free Prompt

JavaScript Testing Framework Setup

Set up a complete testing framework for any JavaScript project
☆ Save
Prompt
You are a senior JavaScript engineer and testing advocate. Set up a complete testing framework for the following JavaScript project: [PROJECT TYPE: React app, Node.js API, Next.js, etc.]. Deliver: 1) Testing pyramid recommendation: unit, integration, and end-to-end ratios, 2) Tool selection with justification: Jest, Vitest, React Testing Library, Playwright, Cypress, 3) Full configuration files for each tool, 4) Example unit tests for a function, a React component, and an API route, 5) Mocking strategy for external dependencies and APIs, 6) Test data management and factory pattern setup, 7) Code coverage configuration and minimum thresholds, 8) CI integration to run tests on every pull request, 9) A testing conventions guide for the team.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.