DustinSchau

Proposals

Unit Testing in Javascript: Meet the New All-Stars

Comparison of Native JavaScript Development SolutionsCSS in JS: Benefits, Drawbacks, and Tools

June 01, 2017

Abstract

Unit testing is one of the key determinants many look to to gauge a non-trivial application’s quality. Unfortunately, it can also be one of the first areas to be neglected in the interest of deadlines, new feature requirements, etc. This talk will illustrate the importance of a well-tested code-base, while also utilzing and demonstrating some of the latest and greatest frameworks, tools, and unit testing processes along the way. You’ll leave this talk with a refreshed vigor for unit testing and truly want to unit test all the things.

Details

The talk will begin with a necessary definition of what unit testing is, does, and the value it can provide to a code base. The talk will then segway into common rationale that each of us have likely heard for neglecting testing—deadlines, new feature development takes priority, etc.—while attempting to maintain and clarify that unit testing is every bit as crucial as these commonly asserted rationale.

After discussing the value of unit testing and attempting to debunk common rationale, the foundation of the value of unit testing will be laid. From this foundation, we can shift the discussion to the actual practice of unit testing, including some of the latest advancements in libraries, techniques, and tooling to make unit testing a first class citizen in the JavaScript ecosystem.

The talk will end with a call for each and every attendee to truly always consider unit testing a first-class citizen and priority of any code base. I will share my experiences in unit testing, in not only catching bugs of code that was thought to work a certain way, but also in catching bugs/regressions that may arise from future changes. It will be made obvious that unit testing is just as foundational to the quality of a code base as the source code.

The audience should leave with a clear and concise understanding of the importance of unit testing. They will leave with a greater understanding of some of the newer frameworks (e.g. jest, ava, etc.), techniques (snapshot testing, spies, mocking, etc.), and an appreciation for the value that unit testing provides for catching bugs not only early, but also helpful for future development.

Pitch

Unit testing oftentimes is tacked on to a code base as an afterthought, and in my opinion, is not always given the emphasis it deserves when developing an application or utility. Additionally, with the advent and maturation of testing libraries such as Jest, testing techniques such as snapshot tests, and improved tooling, in general, now is a great time to re-visit and re-establish the importance of unit testing in any code base.

My involvement in this topic is centered on my background as a JavaScript developer for my entire career, as well as a relatively more recent appreciation for the value of unit testing and the ease I feel when a code base is exhaustively unit tested. Early in my career, my perspective may be similar to that of many of the attendees, e.g. a misunderstanding of the importance of unit testing—and an eagerness to meet deadlines and deliver new features and the expense of well-tested functionality—and it is from this eariler perspective that I can tap into to illustrate why unit testing is so important and such a priority for any project I begin to work on today, tomorrow, and every day after.

Dustin Schau

Front-end development is my passion, and I am incredibly lucky to be able to love what I do each and every day.


All posts