Free Course Image Jasmine Testing Framework Course

Free online courseJasmine Testing Framework Course

Duration of the online course: 8 hours and 45 minutes

New

Free Jasmine course for JavaScript unit testing: specs, matchers, spies, async testing, and automated runs with coverage for real-world apps.

In this free course, learn about

  • Getting Started: Jasmine and Unit Testing Basics
  • Building the Calculator App (Core Implementation)
  • Jasmine Setup and Writing Your First Tests
  • Matchers Fundamentals in Jasmine
  • Advanced and Custom Matchers
  • Organizing Specs and Suite Lifecycle Hooks
  • Spies and Test Doubles in Jasmine
  • Spying on Properties and DOM Integration Tests
  • Asynchronous Testing with Promises and Async/Await
  • Running Tests with npm, Karma, Headless Chrome, and Coverage

Course Description

Learn how to write reliable unit tests for JavaScript applications with this free Jasmine testing course in the Technology and Programming category, focused on software testing. You will start by understanding why Jasmine is a popular choice for unit testing and how its core concepts help you validate behavior with clear, readable specs.

Through a practical calculator project, you will connect real UI input handling to testable logic, work with DOM updates, and improve error handling so your app behaves predictably in edge cases. You will then set up Jasmine properly and follow common naming conventions while organizing suites and specs in a maintainable way.

The course guides you through expectations and matchers in depth, including equality checks, truthy and falsy conditions, null and undefined handling, containment checks, NaN validation, regex matching, and error assertions. You will also explore asymmetric and custom matchers to handle flexible assertions and create reusable testing patterns.

As you progress, you will structure tests with nested suites, apply setup and teardown lifecycle hooks, and use shared context effectively. You will gain hands-on experience with spies and test doubles, covering function spying, stubbing behavior, call tracking, argument checks, prototype spying, and advanced spy configurations such as callThrough, callFake, return values, and throwing errors.

Finally, you will test asynchronous JavaScript with promises, done callbacks, and async await, while learning how to mock network calls to keep tests fast and deterministic. You will also automate test execution with a runner setup, add headless browser support, and generate coverage reports to measure what your tests truly verify.

Course content

  • Video class: 1. Why Jasmine for Unit Testing. Introduction to Jasmine Framework for JavaScript Applications. 10m
  • Exercise: What is unit testing?
  • Video class: 2. Create Simple Calculator Program 08m
  • Video class: 3. Build the Calculator Program UI and capture the input value from the Textbox - Jasmine Testing 08m
  • Video class: 4. Extract numbers 09m
  • Video class: 5. Calculate the result using switch case and update the result in the DOM - Jasmine Testing 08m
  • Exercise: In the simple calculator, which structure is used to choose the correct operation based on the operator (+, -, *, /)?
  • Video class: 6. Improving Errors for the Calculator and update the error message in the DOM - Jasmine Testing 08m
  • Video class: 7. Setup Jasmine Testing Framework for Unit Testing in the Calculator program - Jasmine Testing 09m
  • Exercise: After installing Jasmine as a standalone, which file should you open to view the test results in the browser?
  • Video class: 8. Understanding the Testing File Naming Conventions and the concept of Suite in Jasmine Testing 08m
  • Video class: 9. Create our Test Suite in the calculator spec file using describe method - Jasmine Testing 06m
  • Exercise: In Jasmine, which function is used to create a test suite (a group of specs/tests)?
  • Video class: 10. Write first Spec in the Test Suite for Calculator Spec file - Jasmine Testing 08m
  • Video class: 11. What is Expectations in Testing and write expectation in spec file using expect method - Jasmine 08m
  • Exercise: In Jasmine, what does an expectation represent?
  • Video class: 12. Passing and Failing Specs. When can we say a spec is passed and failed - Jasmine Testing 08m
  • Video class: 13. How to make a Spec or Suite to Disabled Spec and Disabled Suite in Jasmine Testing Framework 08m
  • Exercise: In Jasmine, what is the correct way to disable a single spec so it shows as pending and is not executed?
  • Video class: 14. What are Matchers? Why we use matchers for expectations in Jasmine Testing Framework. 08m
  • Video class: 15. Learn toBe Matcher in Jasmine Unit Testing Framework - JavaScript Testing 09m
  • Exercise: In Jasmine, what does the matcher expect(actual).toBe(expected) primarily check?
  • Video class: 16. Understand toEqual Matcher. Difference between toBe 09m
  • Video class: 17. ToBeTruthy and tobeFalsy Matcher and the difference between them - Jasmine Testing 08m
  • Exercise: Which Jasmine matcher should you use to verify that a value evaluates to false in a boolean context (e.g., 0, "", null, undefined, NaN)?
  • Video class: 18. Negating Matcher. Invert the matchers using Not in Jasmine Testing 04m
  • Video class: 19. toBeUndefined and toBeDefined Matchers. When to use these matchers in Jasmine Testing Framework. 08m
  • Exercise: In Jasmine, what does the matcher toBeUndefined() check?
  • Video class: 20. Understand toBeNull Matcher - Jasmine Testing Framework 05m
  • Video class: 21. toContain Matcher to find element in an array or substring in a string - Jasmine Testing 07m
  • Exercise: In Jasmine, what does the toContain matcher verify?
  • Video class: 22. toBeNaN Matcher to find the value whether it is NaN or not - Jasmine Testing Framework 08m
  • Video class: 23. Learn toThrow matcher to check whether the function throw something - Jasmine Testing 08m
  • Exercise: How do you correctly use Jasmine's toThrow matcher to test that divide(0) throws an error?
  • Video class: 24. toThrowError Matcher and the difference between toThrow and toThrowError - Jasmine Testing 08m
  • Video class: 25. toMatch Matcher for matching the actual data using regular expression - Jasmine Testing 08m
  • Video class: 26. Asymmetric Matcher anything. When to use 06m
  • Video class: 27. Asymmetric Matcher Jasmine.any. Difference between anything and any matchers 05m
  • Video class: 28. Jasmine ObjectContaining and StringContaining asymmetric matchers - Jasmine Testing 05m
  • Video class: 29. What is Custom Matcher. How to create our own matcher 08m
  • Exercise: In Jasmine, what must a custom matcher method return to be valid?
  • Video class: 30. Practical implementation of the Custom Matchers and use it in our Spec file - Jasmine Testing 10m
  • Video class: 31. List of Recommendations for organizing Specs in JavaScript Testing - Jasmine Testing 05m
  • Exercise: In Jasmine, what is the purpose of using the describe() method when organizing specs?
  • Video class: 32. Nested Suites | Write Nested Suites using describe in JavaScript testing | Jasmine Testing 10m
  • Video class: 33. Setup and Teardown Life cycle Methods for Suites in JavaScript Testing - Jasmine Testing 07m
  • Exercise: In Jasmine, which pair of methods belongs to the setup phase (runs before specs) within a suite lifecycle?
  • Video class: 34. Implementation of beforeEach and afterEach methods in the Test Suite - Jasmine Testing 08m
  • Video class: 35. Implement main.js spec file 10m
  • Exercise: Why was main.spec.js not showing up in the Jasmine runner output at first?
  • Video class: 36. Implement beforeAll and afterAll lifecycle methods in main spec file - Jasmine Testing 08m
  • Video class: 37. Use of this keyword in Jasmine Testing. How to use the this in specs - Jasmine Testing 05m
  • Video class: 38. Jasmine Spies and Why we need to use the spies in Unit Testing - Jasmine Testing 09m
  • Video class: 39. What are Jasmine Spies and Test doubles. Different Spy Matchers available in Jasmine Testing. 08m
  • Exercise: In Jasmine, what is the main purpose of using a spy (test double)?
  • Video class: 40. Spying and stubbing on the functions in the spec file using spyOn Method - Jasmine Testing 08m
  • Video class: 41. Usage of toHaveBeenCalled spy matcher in Spec file For Jasmine Spies - Jasmine Testing 08m
  • Exercise: Which Jasmine spy matcher is used to verify that the updateResult method was invoked during calculate() execution for an invalid expression?
  • Video class: 42. toHaveBeenCalledWith Matcher in Jasmine Spies - Jasmine Testing 05m
  • Video class: 43. toHaveBeenCalledTimes Matcher in Jasmine Spies - Jasmine Testing 05m
  • Exercise: Which Jasmine spy matcher is used to verify how many times a function (e.g., updateResult) was called?
  • Video class: 44. Spying on the prototypes using spyOn method - Jasmine Testing 09m
  • Video class: 45. Spying on the methods multiply, divide and subtract calculator prototypes - Jasmine Testing 08m
  • Exercise: When spying on calculator prototype methods for operations (add/subtract/multiply/divide), which argument should the spy expect the operation method to be called with?
  • Video class: 46. Call the implementation of the spy function using callThrough - Jasmine Testing 09m
  • Video class: 47. call customized functionality for a spy method using callFake - Jasmine Testing 04m
  • Exercise: In Jasmine, what does callFake do when used with a spy on a method?
  • Video class: 48. Return a single value with the spy using returnValue configuration method - Jasmine Testing 04m
  • Video class: 49. Return Multiple values with the spy method for every call using returnValues - Jasmine Testing 07m
  • Exercise: In Jasmine spies, what is the main purpose of using returnValues() instead of returnValue()?
  • Video class: 50. throwError config method to send error when a spy method is called - Jasmine Testing 05m
  • Video class: 51. Create new getter property in calculator object using Object defineProperty - Jasmine Testing 09m
  • Exercise: Which statement best describes how Jasmine's spyOn behaves with getter properties?
  • Video class: 52. Show version number in the calculator UI from the calculator getter property - Jasmine Testing 06m
  • Video class: 53. Implement the Version Test Case by spying on the document getElementById - Jasmine Testing 09m
  • Video class: 54. Spy on the getter and setter properties using spyOnProperty method - Jasmine Testing 09m
  • Video class: 55. Asynchronous call with Fetch method to get version from api url using Promises - Jasmine Testing 08m
  • Exercise: When implementing an asynchronous getter for a calculator version using fetch, why is .then() used when accessing calculator.version?
  • Video class: 56. Create Specs for Asynchronous calls using done callback for handling promises - Jasmine Testing 08m
  • Video class: 57. Create Spy on the api Fetch call to avoid making real call while testing - Jasmine Testing 08m
  • Exercise: In Jasmine, why is the done callback recommended when testing asynchronous code that returns a Promise?
  • Video class: 58. Testing JavaScript async and await calls - Jasmine Testing 04m
  • Video class: 59. Initialize the npm package and create package.json file in calculator app - Jasmine Testing 08m
  • Exercise: Why install Jasmine as an npm package instead of adding many source and spec files manually in specRunner.html?
  • Video class: 60. Understand Karma Test Runner Tool for automating tests in Jasmine Testing application 09m
  • Video class: 61. Install the Karma Runner and Jasmine as dev dependencies in the application - Jasmine Testing 08m
  • Exercise: Why is Karma used as a test runner in this setup?
  • Video class: 62. Create Karma Configuration file, karma.config.js for running Tests in app - Jasmine Testing 10m
  • Video class: 63. Install Puppeteer for adding Chrome Headless browser in the karma config file - Jasmine Testing 09m
  • Exercise: What is the main purpose of using the Karma Chrome Launcher (and ChromeHeadless) when running tests?
  • Video class: 64. Add coverage Reports using karma-coverage plugin in the Karma application - Jasmine Testing 10m
  • Video class: 65. Completing Jasmine Testing Course. Recap the Concepts that we have covered in this Course 09m

This free course includes:

8 hours and 45 minutes of online video course

Digital certificate of course completion (Free)

Exercises to train your knowledge

100% free, from content to certificate

Ready to get started?Download the app and get started today.

Install the app now

to access the course
Icon representing technology and business courses

Over 5,000 free courses

Programming, English, Digital Marketing and much more! Learn whatever you want, for free.

Calendar icon with target representing study planning

Study plan with AI

Our app's Artificial Intelligence can create a study schedule for the course you choose.

Professional icon representing career and business

From zero to professional success

Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.

You can also use the QR Code or the links below.

QR Code - Download Cursa - Online Courses

More free courses at Software testing

Free Ebook + Audiobooks! Learn by listening or reading!

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate