TDD in JavaScript - small workshop

Darusz Biedrzycki

TDD in JavaScript - small workshop

Dariusz Biedrzycki

Good start ...

You have plan

You have good structure (framework)

You have skillfull people

Terrible end...

Patched patches

Old code that wrote first developer

Etc.

Pix credit:  Lauri V  from Panoramio

Ver 2.0

Complete new version

Clean start

Deep breath

Ver 2.0

Wrong turn

Double development (ver 1 and 2)

Same developers = same mistakes

Is there any easy solution?

No

But exist some cure

TDD

Test Driven Development

TDD

Simple

Very quick

Test

TDD

We test only code

Test in isolated environment

Test corner case

We not need any browser

We not need any browser?????

Thats not realy true...

TDD

Three states

1.Fail

2. Pass

3. Refactor

Workshop

FAIL PASS REFACTOR

Before start

Install node.js from http://nodejs.org/

From workshop katalog type:

npm install

Links

http://nodejs.org/

Jasmine

Links

Bizarre Russian House

World's tallest wooden house

Sutyagin_House

Dziękuję za uwagę

Fork me on Github