Testing JavaScript with Jasmine 2 and TypeScript
This course serves as an introduction to using TypeScript with Jasmine for writing units tests in JavaScript.
What you'll learn
TypeScript will transport us into the future of JavaScript, transforming our authoring experience, and allowing us to use current and proposed ECMAScript language enhancements. In this course, Testing JavaScript with Jasmine and TypeScript, you'll start with the motivations for unit testing, and why crafting good unit tests is so important. Next, you'll look at basic test definition including test setup, nested scoping, and assertions. You'll also learn about dynamic mocking and the ins and outs of testing with dependencies. Finally, you'll look at techniques for creating reliable tests, and some of the consequences when you don't. By the end of this course, you'll feel confident in leveraging TypeScript to maximize your productivity with Jasmine.
Table of contents
- Module Overview 1m
- How to Make Your Unit Tests Speak the Truth 5m
- Writing Your Very First Jasmine Test, Kind-of 6m
- Your Jasmine Test Results in the Browser 2m
- Testing the MasterContoller: Using Describe to Describe 5m
- Setting up Our Tests for Success 5m
- Time to Bring out Cousin It 10m
- Tests Gone Wrong 5m
- Summary 1m
- Overview 1m
- Of Mice and Mocking 5m
- Jasmine's Super Secret Agent Man 5m
- Testing Our Tests, Trusting Our Spies 4m
- Examining the DogController's Interactions 4m
- The Spec Setup and TypeScript's Specialized Overloads 3m
- Using Stubby Spies for Filling Gaps 4m
- Wise Spies for Testing Interactions 4m
- We Don't Need No Stinking Mocks 3m
- Summary 1m
- Overview 1m
- Make 'Em Tough 5m
- Dogs in Space 3m
- Analyzing the Photo Service 4m
- Creating a Tough Foundation 4m
- Leveraging Configuration 3m
- Finishing the Setup 3m
- What We Care About and What We Don't 4m
- Expecting the Invalid 3m
- The RESTful Response 5m
- Configuration Mess, Testing Success 3m
- The Impact of Fragility 7m
- Summary 1m
Course FAQ
Jasmine is a great testing framework with an intuitive syntax. TypeScript is a typed superset of JavaScript.
Jasmine helps you to optimize your time, organize your code, isolate your units, and communicate results. TypeScript gives you immediate feedback on your code, like a trusty pair programmer.
This course is for anyone wanting to get into the future of JavaScript with TypeScript, which allows you to use current and proposed ECMAScript language enhancements.
In this course you'll learn how to write fantastic unit tests in Jasmine, and how to use TypeScript to turbocharge your testing productivity.
You don't need to be familiar with Jasmine or TypeScript to dive into this course. Just a general knowledge of JavaScript will do.
We'll be using Visual Studio Code, an open source, multi-platform code editor that's particularly adept at optimizing TypeScript; however, many popular IDEs and editors can utilize TypeScript definitions in the edit window.