TDD in JavaScript – Frist, let's talk about test – So, what's TDD anyway



TDD in JavaScript – Frist, let's talk about test – So, what's TDD anyway

0 0


tdd-in-javascript

TDD workshop in JavaScript

On Github abruzzi / tdd-in-javascript

TDD in JavaScript

Created by Juntao Qiu @ThoughtWorks

Frist, let's talk about test

In-time Feedback

comments

/**
 * updateContent
 * Update content into the container
 * 
 * @param container
 * @param callback
 */
function updateContent(url) {}
						

documents are out of date, while tests aren't

Confidence of refactor

Think in user's perspective

So, what's TDD anyway

Tea Driven Development

Test Driven Development

Not just write test first

Specification By Example

Free delivery

Free delivery is offered to VIP customers once they reach a certain number of books in their cart. Regular customers, and VIP customers beneath this threshold, do not receive free delivery.

Type of customer NO. of books in cart Free delivery? VIP 9 No VIP 10 Yes VIP 11 Yes Regular 9 No Regular 10 No Regular 11 No

environment setup

mommify

You are given strings of different lengths. If the number of vowels are more than 30% of the string length then replace "mommy" for each continuous set of vowels.

Input String Output String Comment hmm hmm No vowels ship ship Less than 30% his hmommys Greater than 30% hear hmommyr Continuous Vowels

THE END

https://github.com/abruzzi/3-pages-in-3-weeks