►Kumar Programming - Keep Learning in a simple way
#6- Testing Asynchronous functions and | Mocha Chai Unit Testing in TypeScript & Node Js
This is 6th video of this series, hope you are learning well. In this video we have covered how to test asynchronous functions and promises by using async await as well as by resolving promise using then method.
► Topics covered in this Series
1. Introduction –Unit Testing Mocha Chai - Done
2. Installation and Writing Test Suites and Test cases and Running Test cases (describe , it) - Done
3. Chai - Different Chai Assertion Styles (assert, expect, should) - Done
4. Common Chai Assertions - Done
5. Hooks (before, after, beforeEach, afterEach) - Done
6. Nested Test Suites- Done
7. Skipping and Focusing Tests (skip, only) - Done
8. Sinon (Spying, Mocking and Stubbing) - Done
9. Asynchronous Testing – (async await) - Done
10. Testing Promise - Done
11. Nock - Mock Api Calls and data
12. GET POST Api Testing
13. Code Coverage and Reporting (nyc-Istanbul)
► Used Framework and libraries
Mocha - Unit testing framework is the most popular framework for TypeScript/Javascript unit testing.
In this series, I used below popular libraries
Chai - for assertion with with multiple assertion style
Sinon - for spying , mocking and stubbing
Nock - for async api mocking
Nyc - Unit test coverage report by nyc Istanbul and configurations
► Sample code on github:
https://github.com/kyprogramming/moch...
► Subscribe :
Subscribe Kumar Programming to watch more tutorials:
/ @kyprogramming
/ @kyprogramming
► JAVASCRIPT :
JavaScript - Interview Questions Answer Series - Introduction • JavaScript- Interview Questions Answ...
JavaScript - Interview Question - What is Difference between Map and WeakMap Object? • JavaScript - Interview Question - Wh...
JavaScript Interview Question - What is Design Pattern ? [ Singleton Factory & Observer ] • JavaScript Interview Question - What ...
JavaScript Interview Question - What is Hoisting and Temporal Dead Zone (TDZ) ? • JavaScript Interview Question - What ...
JavaScript Interview Question - What is Type Coercion ? • JavaScript Interview Question - What ...
JavaScript Interview Question - What is difference between Spread and Rest Operator? • JavaScript Interview Question - What ...
JavaScript Interview Question - What is difference between Shallow Copy and Deep Copy? • JavaScript Interview Question - What ...
► FULL STACK DEVELOPER :
Full Stack Developer - Introduction - Road Map • Full Stack Developer - Introduction ...
► UNIT TESTING - MOCHA CHAI :
#1- Introduction | Unit Testing | Mocha Chai in TypeScript Node • #1- Introduction | Unit Testing | Mo...
#2- Configuration and Installation | Unit Testing | Mocha Chai in TypeScript Node • #2- Configuration and Installation |...
#3- Chai Assertion Style-(Should Expect Assert) | Common Chai Assertion | Mocha Chai TypeScript Node • #3- Chai Assertion Style-(Should Expe...
#4- Hooks | Nested Test Suite | Skip/Only | Mocha Chai Testing in TypeScript & Node • #4- Hooks | Nested Test Suite | Skip...
#5- Syp Stub Mock using Sinon | Mocha Chai Unit Testing in TypeScript & Node Js • #5- Syp Stub Mock using Sinon | Mocha...
#6- Testing Asynchronous functions and Promise | Mocha Chai Unit Testing in TypeScript & Node Js • #6- Testing Asynchronous functions an...
#7- Uesting for GET POST API using NOCK | Mocha Chai Unit Testing in TypeScript & Node Js • #7- Uesting for GET POST API using N...
#8- Code coverage and Reporting using nyc tool | Mocha Chai Unit Testing in TypeScript & Node Js • #8- Code coverage and Reporting using...
► NODE JS - COMPLETE PROJECT :
Complete - Unit Testing -Mocha Chai in Node Typescript - 2 Hrs • Complete - Unit Testing -Mocha Chai...
Part 1 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -1- NodeJs Express TypeScript Mo...
Part 2 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -2- NodeJs Express TypeScript Mo...
Part 3 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -3- NodeJs Express TypeScript M...
Part 4 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -4- NodeJs Express TypeScript M...
Step by Step - Complete Project - NodeJs Express TypeScript Mongo DB Library Management - 05 Hrs • Step by Step - Complete Project - N...
► ANGULAR :
Angular Interview Questions - Difference between JIT and AOT Compiler • Angular Interview Questions - Differ...
Angular Interview Questions - Promise Vs Observable - With Practical Demo • Angular Interview Questions - Promise...
Angular Web Component Standalone - Single JavaScript File - Step By Step • Angular Web Component Standalone - Si...
Angular Interview Question - Unit Testing - Step by Step - Part 1 • Angular Interview Question - Unit Te...
Angular Interview Question - Unit Testing - Part 2 • Angular Interview Question - Unit Tes...
Angular Interview Question - Unit Testing - Complete • Angular Interview Question - Unit Tes...
#Mocha #chai #UnitTesting #TypeScrriptUnitTesting #TSUnitTesting #typescript #typescripttutorial #JSUnitTesting #programming #coding #nodejs #nodejstutorial