Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Using TDD With Modern JavaScript

DZone's Guide to

Using TDD With Modern JavaScript

· Agile Zone ·
Free Resource

Download the whitepaper on Product Centric Agile Delivery. Brought to you in partnership with Jile.

Scott Allen is the founder and Principal Consultant with OdeToCode LLC. He is also a member of the Pluralsight technical staff.  This article contains NDC 2010 presentations by Allen and Mark Nijhof about modern JavaScript and how to make it 'test-driven'. 

"JavaScript is a dynamic, functional, ubiquitous language that has many hidden secrets. In this session we will take a deep look at the core JavaScript features that many contemporary libraries leverage, including constructor functions, prototypical inheritance, closures, hash parameters, method chaining, and more. Having a solid grasp of these features will not only help you write more maintainable JavaScript code, but also allow you to take greater advantage of today’s JavaScript libraries."  --Scott Allen



Mark Nijhof has been working in software development since 2000 and recently founded Cre8ive Thought to be the next step in his career.

"Javascript becomes much more important to interactive website development then before (ok it has been for a while already) but the notion of testing that logic seems even further fetched then testing the code written in C#, Java. And this is something that is wrong as well.

How do you test drive your javascript development, what do you need to think about to make it testable? How can you deal with timers, async calls and the dom. Demonstrate all these things including how easy it is to make your own fakes for testing. Demonstrate the refactoring and changing behaviour becomes so much easier.And not to forget that the design of the code is much better as well. Basically that you gain all the benefits that TDD gives you in other languages also when doing TDD for javascript development.

Building a feature without ever loading up a web–page to physically look at it and when you finally do it does exactly what you intended it to do, that is magic :–)"  --Mark Nijhof


Download the whitepaper on Five dimensions of Scaling Agile in Large Enterprises. Brought to you in partnership with Jile.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}