PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - (gpt-5.5)
Token size
363
Example input
[LANGUAGE]: JavaScript [TEST_FRAMEWORK]: Jest [CODE]: function getUser(users, id) { return users.find(u => u.id === id); } [DEPENDENCIES]: database client, HTTP client
Example output
describe('formatPrice', () => { it('returns "$1.00" for 100 cents USD', () => { expect(formatPrice(100, 'USD')).toBe('$1.00'); }); it('returns "$0.00" for 0 cents', () => { expect(formatPrice(0, 'USD')).toBe('$0.00'); }); it('throws RangeError for negative cents', () => { expect(() => formatPrice(-5, 'USD')).toThrow(RangeError); }); it('throws TypeError for non-number cents', () => { expect(() => formatPrice('100', 'USD')).toThrow(TypeError); }); it('formats EUR with Euro symbol', () => { expect(formatPrice(250, 'EUR')).toBe('EUR2.50'); }); });
GPT

Unit Test Generator 90 Coverage Test

Add to Cart
PromptBase Select
Get this prompt + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View Select
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-5.5
Tested icon
Guide icon
4 examples icon
Free credits icon
Generate comprehensive unit tests that actually catch regressions. This prompt writes happy-path, edge-case, and error-path tests for any function, with proper mocking of dependencies, descriptive test names, and assertions that document the expected behavior. Outputs ready-to-run code for [TEST_FRAMEWORK] with coverage targets and a missing-coverage report. Spend minutes, not hours, on tests. Want 100+ more? Search 'AI Coding Prompts Pack' on Gumroad.
...more
Added over 1 month ago
Report
Browse Marketplace