TDD and the Art of Unit Testing in JavaScript with Roy Osherove

Kurskod MC063

TDD and the Art of Unit Testing in JavaScript with Roy Osherove

Unit testing, done badly, can hurt your project more than it helps. In some cases, it may lead to project schedule delays, and unhappy developers due to huge maintenance problems. But when unit testing is done right, it can help the project and developers’ confidence immensely.

Pris
20450 kr (exklusive moms)
Längd
2 dagar
Ort och datum
Hålls på begäran

Kursen hålls på begäran

Kontakta oss för mer information.

Telefon: 08-562 557 50 
E-post: info@cornerstone.se

The challenge is - how do you do it in a way that is helping, rather than hurting your project?

In this coding-packed course we will learn essential test driven skills and techniques for writing unit tests in a readable, maintainable and trustworthy fashion, so that we can feel more confident in our code, make it simpler, and save ourselves time in debugging and maintaining our code base. we will also look at some code design issues that hurt testability.

Roy is the author of "The Art of Unit Testing", "Elastic Leadership" and the "Enterprise DevOps" books. He is an independent consultant working across Europe caching about TDD, Leadership, DevOps, and everything that is needed to make those three tick.


Target Audience and Prerequisites

This course is intended for web developers. The prerequisites are:

  • Expected developer knowledge in node.js or frontend js development (angular/react/vue etc.)
  • Visual Studio Code, IntelliJ, Webstorm or other JS enabled IDEs
  • JS ES2015 syntax knowledge

This course is taught in English.

Course objectives

  • Learn how to write readable, maintainable, trustworthy unit tests using Javascript and node.js.
  • Learn how to refactor code, and SOLID design concepts.
  • Learn the principles of Test Driven Development, and develop new features using TDD.
  • Learn how to Pair Program, and experience it throughout the course.
  • Learn about mocks, stubs, spies & fakes, and the difference between them.
  • Learn about testing frameworks such as jest and Jasmine, and isolation (mocking) frameworks like sinon & jest mocks.

Course details


Day 1: Beginnings
  • Units, entry points & exit points
  • The first unit test & a continuous testing environment
  • Jest basics & Drills
  • Writing readable, maintainable tests
  • Test Driven Development Introduction
  • String Calculator,Password Verifier Kata Drills
  • Value based, State Based and Interaction Based Tests
  • Fakes, Spies Mocks and Stubs
  • Hand Written Fakes, Stubs and Mocks
  • Faking Time & Drills
Day 2: Mock Objects and Stubs
  • Faking other dependencies & Drills
  • fn, jest.spyOn and other creatures
  • Async in Tests & Drills
  • Callback refactoring & Drills
  • Faking whole modules & Drills
  • Unit Testing Good Practices
  • Code Review Drills

Få inspiration & nyheter från oss

Jag godkänner att Cornerstone skickar mig nyheter via e-post