Behavior-Driven Development in JavaScript
Sezgi Şensöz Tulum @mefallit
Codefront.io - May 10, 2014
Testing = Development methodology
Why is testing useful?
waste of time?
find and fix bugs faster
prevents bugs from reappearing
avoid spending time to test again
keep our software design healthy
reliable documentation
What about BDD?
It's also TDD!!!
Not an evolved version of it..
TDD focuses on the developer's opinion
BDD on the user's opinion
TDD's perspective
When DomReadyEvent is triggered, app.showWelcomeMessage() will be executed.
BDD's perspective
When user enters the website,
"Welcome" message will be shown.
BDD with Jasmine
BDD framework
Does not depend on any other JS frameworks
Does Not require a DOM
not re
quire a DOM
Works on browser
clean, obvious syntax
Spec and suites
Matchers
Spies
Asynchronous specs
In JavaScript everything works on single treads.
But..
XHR requests and timer events?
How to install
Just download standalone version from github
Lets look inside..
Contact Me
- Twitter: @mefallit
- Github: @mefallit
- Mail: sezgisensoz@gmail.com
-
Linkedin: http://www.linkedin.com/in/ssensoz