add a test for the payment path
Adding the test.
Created
payment.test.ts
+4
payment.test.ts
+
1
test('charges', () => {
+
2
const card = { number: '4111111111111111', exp: '12/29', cvc: '123' }
+
3
expect(charge(card, 1200).ok).toBe(true)
+
4
})
Problem
add a test for the payment path
Adding the test.
Failed to create
payment.test.ts
Blocked: load the write-tests skill before writing a test.
file_path:
payment.test.ts
content:
test('charges', () => { // … })
Solution