Unit testing JS = SQLSat 324

Preview:

DESCRIPTION

Unit testing JavaScript - August 2, 2014 - SQL Sat 324

Citation preview

JavaScript Testing—Technically not a number…

Justin Obney, Front-End Dev

Gone are the days of old

Any application that can be written in JavaScript, will be written in JavaScript -- Atwood’s Law

JS is everywhere

That no one thinks they need to actually learn how it works.

Looks like C or Java… How hard could it be?

JavaScript is so approachable

• The old way• Frameworks• The lies• Where to start• Tooling• Who knows?

The Agenda

“Whenever you are tempted to type something into a print statement or a debugger expression, write it as a test instead.” —Martin Fowler

When do I write a test?

Testing Frameworks

•A unit test is code that executes part of your production code with an expectation on the result.

•Unit vs. Integration•Mocking & Stubbing

•Vocabulary

But testing is hard…

But the DOM

Tooling

TEST’EM

I see you are on a Mac… But what about Windows?

But does it scale?

In closing

Thank You

justinobney@gmail.comtwitter.com/justinobneygithub.com/justinobney

apply@envoccareers.com

Recommended