Letâs Get Started
You should get comfortable writing and running tests before we dive into designing with tests. Thatâs what weâll do first: get a project set up and get a few tests running.
Weâll use a very simple function that converts Fahrenheit to Celsius as a vehicle to learn about the test writing fundamentals. As a first step weâll check the installation of Node.js and npm on your system. Then weâll get an example project set up and install the tools necessary for writing the tests. Next, weâll warm up and confirm that everything got installed by writing an introductory test. Along the way youâll learn about test suites and the organization of test and source code files. Finally, weâll write a test to verify the behavior ...
Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.