Рет қаралды 1,428
►Kumar Programming - Keep Learning in a simple way
#7- GET POST API Testing using NOCK | Mocha Chai Unit Testing in TypeScript & Node Js
This is 7th video of this series, hope you are learning well. In this video we have covered how to test GET POST API mentods testing using AXIOS and
NOCK libarary to mock api and its data.
► 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 - Done
12. GET POST Api Testing - Done
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
AXIOS - GET/POST data from API
Nock - for async api mocking
Nyc - Unit test coverage report by nyc Istanbul and configurations
► Sample code on github:
github.com/kyp....
► Subscribe :
Subscribe Kumar Programming to watch more tutorials:
/ @kyprogramming
► JAVASCRIPT :
JavaScript - Interview Questions Answer Series - Introduction • JavaScript- Interview...
JavaScript - Interview Question - What is Difference between Map and WeakMap Object? • JavaScript - Interview...
JavaScript Interview Question - What is Design Pattern ? [ Singleton Factory & Observer ] • JavaScript Interview Q...
JavaScript Interview Question - What is Hoisting and Temporal Dead Zone (TDZ) ? • JavaScript Interview Q...
JavaScript Interview Question - What is Type Coercion ? • JavaScript Interview Q...
JavaScript Interview Question - What is difference between Spread and Rest Operator? • JavaScript Interview Q...
JavaScript Interview Question - What is difference between Shallow Copy and Deep Copy? • JavaScript Interview Q...
► FULL STACK DEVELOPER :
Full Stack Developer - Introduction - Road Map • Full Stack Developer ...
► UNIT TESTING - MOCHA CHAI :
#1- Introduction | Unit Testing | Mocha Chai in TypeScript Node • #1- Introduction | Un...
#2- Configuration and Installation | Unit Testing | Mocha Chai in TypeScript Node • #2- Configuration and ...
#3- Chai Assertion Style-(Should Expect Assert) | Common Chai Assertion | Mocha Chai TypeScript Node • #3- Chai Assertion Sty...
#4- Hooks | Nested Test Suite | Skip/Only | Mocha Chai Testing in TypeScript & Node • #4- Hooks | Nested Te...
#5- Syp Stub Mock using Sinon | Mocha Chai Unit Testing in TypeScript & Node Js • #5- Syp Stub Mock usin...
#6- Testing Asynchronous functions and Promise | Mocha Chai Unit Testing in TypeScript & Node Js • #6- Testing Asynchrono...
#7- Uesting for GET POST API using NOCK | Mocha Chai Unit Testing in TypeScript & Node Js • #7- Uesting for GET PO...
#8- Code coverage and Reporting using nyc tool | Mocha Chai Unit Testing in TypeScript & Node Js • #8- Code coverage and ...
► NODE JS - COMPLETE PROJECT :
Complete - Unit Testing -Mocha Chai in Node Typescript - 2 Hrs • Complete - Unit Testi...
Part 1 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -1- NodeJs Expres...
Part 2 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -2- NodeJs Expres...
Part 3 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -3- NodeJs Expres...
Part 4 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -4- NodeJs Expres...
Step by Step - Complete Project - NodeJs Express TypeScript Mongo DB Library Management - 05 Hrs • Step by Step - Comple...
► ANGULAR :
Angular Interview Questions - Difference between JIT and AOT Compiler • Angular Interview Ques...
Angular Interview Questions - Promise Vs Observable - With Practical Demo • Angular Interview Ques...
Angular Web Component Standalone - Single JavaScript File - Step By Step • Angular Web Component ...
Angular Interview Question - Unit Testing - Step by Step - Part 1 • Angular Interview Ques...
Angular Interview Question - Unit Testing - Part 2 • Angular Interview Ques...
Angular Interview Question - Unit Testing - Complete • Angular Interview Ques...
#Mocha #chai #UnitTesting #TypeScrriptUnitTesting #TSUnitTesting #typescript #typescripttutorial #JSUnitTesting #programming #coding #nodejs #nodejstutorial #kumarprogramming #kyprogramming #stepbystep #learning