Transcript
Page 1: Unit testing JS = SQLSat 324

JavaScript Testing—Technically not a number…

Justin Obney, Front-End Dev

Page 2: Unit testing JS = SQLSat 324

Gone are the days of old

Page 3: Unit testing JS = SQLSat 324

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

JS is everywhere

Page 4: Unit testing JS = SQLSat 324

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

Page 5: Unit testing JS = SQLSat 324

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

The Agenda

Page 6: Unit testing JS = SQLSat 324

“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?

Page 7: Unit testing JS = SQLSat 324

Testing Frameworks

Page 8: Unit testing JS = SQLSat 324

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

•Unit vs. Integration•Mocking & Stubbing

•Vocabulary

Page 9: Unit testing JS = SQLSat 324

But testing is hard…

Page 10: Unit testing JS = SQLSat 324

But the DOM

Page 11: Unit testing JS = SQLSat 324

Tooling

TEST’EM

Page 12: Unit testing JS = SQLSat 324

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

Page 13: Unit testing JS = SQLSat 324

But does it scale?

Page 14: Unit testing JS = SQLSat 324

In closing

Page 15: Unit testing JS = SQLSat 324
Page 16: Unit testing JS = SQLSat 324

Thank You

[email protected]/justinobneygithub.com/justinobney

[email protected]


Top Related