Introduction to JavaScript

Unit Testing

using Mocha & Chai

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.

Created/Presented by: Ashwin Hegde

Agenda

1. Understanding unit testing & Assertion.

2. JavaScript test frameworks.

3. Introduction to Mocha.

4. Introduction to Chai.

What is Unit testing? &

What are Assertion ?

JS Test Frameworks/Runners

1. Qunit.

2. Jasmine.

3. Mocha.

4. PhantomJS.

5. Nodeunit.

Introduction to Mocha

1. Open source test framework.

2. Client and server side testing.

3. BDD and TDD style tests.

4. Command line and browser.

5. Any JavaScript assertion library.

6. Asynchronous testing.

Introduction to Chai

1. Open source assertion library.

2. Command line and browser.

3. Supports 3 interface

     1. Should - covers BDD.

     2. Expect - covers BDD.

     3. Assert - covers TDD.

Summary

Thank You

Any Questions?

can follow me at: github.com/hegdeashwin

Introduction to Mocha and Chai

By Ashwin Hegde

Introduction to Mocha and Chai

Quick introduction to JavaScript Unit Testing with Mocha & Chai and its basics

  • 813