Nice video. please Post more videos related unit testing using Angular 17 or latest versions . please cover NGRX and RXJS unit test cases as well
@kyprogramming12 күн бұрын
@@RaghavendraKarteekThank you Raghav for your support. Certainly I will cover those topics.
@RaghavendraKarteek12 күн бұрын
@@kyprogramming Thanks..
@rahulmehta0852Ай бұрын
thx
@kyprogrammingАй бұрын
Your welcome
@AmolAute-n1jАй бұрын
Thanks
@uzomanwanne2751Ай бұрын
Very nice lectures. I noticed your GitHub link is broken.
@rahulmehta0852Ай бұрын
nice video sir ji
@kyprogrammingАй бұрын
@@rahulmehta0852 Thank you Rahul!
@MithileshPandey-gb4xwАй бұрын
good example....where can i get the code for this?
@SagarSharma-t8yАй бұрын
today i completed , as of now i got a good idea about chai and mocha
@kyprogrammingАй бұрын
@@SagarSharma-t8y thank you for following this.
@satishchandra30762 ай бұрын
Connecting Database from angular app, pls make a video
@kyprogramming2 ай бұрын
@@satishchandra3076 Dear Satish, angular does not connect directly with database. It connect with the database using API. Certainly I'll make the video on it. Thank you for your suggestion.
@amitchauhan15052 ай бұрын
very confusing way to explain. All cluttered.
@kyprogramming2 ай бұрын
Hi Amil, what is you confusion ? Would you please explain a bit more. I would try to solve your query. Thanks
@jyotiagre44302 ай бұрын
how import calculator can you please help me?
@kyprogramming2 ай бұрын
Hi Jyoti,this is just an example taken as Calculator class but you can you use your class in your project in a similar way of writing test cases.
@kyprogramming2 ай бұрын
Further you can use to import class like below code import Calculator from 'abs path for your file'; in case of default export
@jyotiagre44302 ай бұрын
Exception during run: TypeError: Unknown file extension ".ts",how solve this error
@kyprogramming2 ай бұрын
Hi, Would you please install Chai later version "chai":"^4.3.7" to see if this solve your issue
@jyotiagre44302 ай бұрын
How install
@kyprogramming2 ай бұрын
First of all remove existing Chai from your package.json file and then run npm i chai
@jyotiagre44302 ай бұрын
Thank you
@jyotiagre44302 ай бұрын
What is next command
@Wh---2 ай бұрын
Do you have js notes , Share Sir
@kyprogrammingАй бұрын
Thank you. Code should be there in the GitHub link provided in the description. Please let me know if you don't find it.
@kaushikraj5213 ай бұрын
Exception during run: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" plz solve this error
@kyprogramming3 ай бұрын
Certainly I would help you on this. Could you please share yr package.json and tsconfig.json file to me.
@forprogrammers68273 ай бұрын
very good explanation.
@kyprogramming3 ай бұрын
Thank you 👍
@cesrra_3 ай бұрын
To solve the "TypeError [ERR_UNKNOWN_FILE_EXTENSION]" Install the version "^4.3.7" of chai
@orlandopl2672 ай бұрын
I solved the error installing that mentioned version of chai but why did it work?
@kyprogramming2 ай бұрын
@orlandopl267 good to know that you have solved issue by installing later version of Chai. Really not sure what could be reason behind it. However there was issue raised for this in Chai. Please see below link for for details. github.com/chaijs/issues/1568
@JaroslawKubiak-hq8qd3 ай бұрын
Did you have to put this Subscription notification every minute?
@kyprogramming3 ай бұрын
Thanks for your suggestion, I have moved subscription notification in the last for all my later uploaded videos.
@TheDekhun3 ай бұрын
Great Tutorial. Thanks for the content
@kyprogramming3 ай бұрын
Thank you👍
@priscachidimma18963 ай бұрын
You explained very clearly 👏
@kyprogramming3 ай бұрын
Thank you Prisca!!
@shr3y4sh4 ай бұрын
Mast kaam krta hi bhai tum
@kyprogramming4 ай бұрын
Thank you Shreyash for comment!
@styfleur8804 ай бұрын
Thank you for the content. I have a question. How do you mock, stub or spy an anonym function?
@kyprogramming4 ай бұрын
Thank you for your comment. Its a very good question , so I thought to make a video on this, which I have published it today. I hope this will be helpful to understand. Please let me know if you have if still you have any query. Link is given mentioned below: kzbin.info/www/bejne/qHqmXn2JaZKXrLc
@adelminwer26755 ай бұрын
amazing content bro
@kyprogramming5 ай бұрын
Thank you Adelminwer 👍
@Zainab-kazme5 ай бұрын
Thanks much 👍🏻
@kyprogramming5 ай бұрын
Thank you Zainab👍
@sourabhkumar33335 ай бұрын
kzbin.info/www/bejne/fHmwloWArLyLgJY both are same or diffrent??
@kyprogramming5 ай бұрын
this is one part of the complete video. thank for checking.
@butenitin5 ай бұрын
very simple and best explanation.
@kyprogramming5 ай бұрын
Thank you for your comment !!
@KarthickRajendran-y2v5 ай бұрын
Thank bro. Very well explained
@kyprogramming5 ай бұрын
Thanks a lot for your comment 👍
@HemanthC-we3wb5 ай бұрын
Hi bro, i tried all the methods to solve but still i am facing the issue "hemanthc@Hemanths-MacBook-Air API-testing-pratice % npm run test > [email protected] test > mocha --require ts-node/register test/**.spec.ts Exception during run: TypeError: Unknown file extension ".ts" for /Users/hemanthc/API-testing-pratice/test/calculator.spec.ts at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9) at defaultGetFormat (node:internal/modules/esm/get_format:203:36) at defaultLoad (node:internal/modules/esm/load:143:22) at async ModuleLoader.load (node:internal/modules/esm/loader:409:7) at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45) at async link (node:internal/modules/esm/module_job:76:21) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }Z " can u help me
@kyprogramming5 ай бұрын
Certainly I would like to help.. Please let me know if we could connect on FB.
@shoxruxnurmuxammedov71815 ай бұрын
thank you sir, it was very helpful
@kyprogramming5 ай бұрын
Thank you for your valuable comment ! 👍
@shoxruxnurmuxammedov71815 ай бұрын
good job!, that's exactly what I was looking for
@kyprogramming5 ай бұрын
Glad I could help!
@manojhk74695 ай бұрын
usefull and in depth explanation.
@kyprogramming5 ай бұрын
Thank you Manoj!
@PreCodeCamp5 ай бұрын
Useful tips thanks for sharing. Scope and hoisting are always hard concepts to understand. You went nice and slow.
@universal43346 ай бұрын
Hi bro. Need you gmail id
@viral_topics_memes6 ай бұрын
nice but thoda zoom karo
@kyprogramming6 ай бұрын
Thank you!!
@sammiewilkinson40796 ай бұрын
😔 'Promo sm'
@leemanheilee886 ай бұрын
The bell ring is so annoying
@kyprogramming6 ай бұрын
Thank you for letting me know.. I will take care of bell ring from all my upcoming video.
@ShahrukhWonder6 ай бұрын
Best vdo on int
@kyprogramming6 ай бұрын
Thank you Shahrukh for your comment!
@aparnamishra15307 ай бұрын
very informative video, i have a question, what if i use toPromise() with observables instead of promise? You can make a separate video on it. also explain await, async in the same video so that we'll get clear idea.
@kyprogramming7 ай бұрын
Thank you Aparna! .toPromise is utility method from Observable and that is used to convert an Observable into a Promise which resolve promise with the last emited value. Hope I have answered for your query. Certainly I will make an video on async and await soon. Thank you for your suggestion. Thanks
@aparnamishra15307 ай бұрын
thank u@@kyprogramming
@akiii4617 ай бұрын
thanks for the detailed comparison....
@kyprogramming7 ай бұрын
Your welcome👍
@mustafasdet54467 ай бұрын
Hi. Executed same actions with you but getting "TypeError: Unknown file extension ".ts" for ...path/calculator.spec.ts i have searched the error in google but recommended solutions causing other errors. Do you have any suggestion? Thx
@kyprogramming7 ай бұрын
If you're encountering an "unknown file extension .ts" error while using Mocha, it likely means Mocha doesn't recognize TypeScript files by default. To fix this, you can use a tool like ts-node to transpile TypeScript files on-the-fly before running tests. npm install --save-dev ts-node tsconfig-paths Also could please add .mocharc.json file.. { "extensions": ["ts"], "spec": ["**/*.spec.*"], "node-option":[ "experimental-specifier-resolution=node", "loader=ts-node/esm" ] } This could solve your problem. Please let me know if this solve your issue. Thanks
@adanos20062 күн бұрын
try to use chai version 4.5.0. i had same problem and it's helps
@hemachandran80827 ай бұрын
How is const a is accessible inside function second as its block scope?
@kyprogramming7 ай бұрын
Thank you Hema for your query.. Variable a is declared in global scope and it will be lexically scoped to all the child scope, therefore it's been accessible inside the block scope. I hope I have answered for your query.. Thanks
@bgovindnaren74057 ай бұрын
One genuine doubt of mine... Isn't this same as saying a =0 b =0 and hence a =b? no offence fantastic video!
@kyprogramming7 ай бұрын
Thank you Govind for your comment! If you are saying a=b it means you are assigning value of b to a. In order to check equality for a & b you should use == or === strict equality check operator like a === b or a == b. I hope I have answered for you query. Thanks.
@bgovindnaren74057 ай бұрын
@@kyprogramming No sir... In the test we are only setting the value for the mocked response(let say for the response status is always gonna be 200 because we have returned the same in the main file) and in the expect(res.status) we saying that it should be equal to 200 So its always gonna pass the testcase if you only change the status from 200 to 404 in the expect statement then only it will fail. So in this analogy isn't this same as that of saying let a = 0. and b = 0( 0 is nothing but mocked response and the expected response in the expect statement) and saying a = b. In that sense I was asking the question. Pls clarify this doubt of mine.
@kyprogramming7 ай бұрын
@@bgovindnaren7405 ok, got your point. whenever we are trying to test any functions , we should mock other dependencies with the some mocked response (should not necesary have the actulal response )and same can we verify under assert. The whole idea is to test functionality for the relevent function under a single test cases not to the it's dependencies. Also its depends upon requirements and use cases what exactly we have to test. In this tutorial I have explained how we can utilize nock libraby in order to mock our actual API functionality for GET and POST. Hope I make it clear to you.
@jaywantnarwade55177 ай бұрын
where is interview questions and answer?
@kyprogramming7 ай бұрын
Hi Jaywant, this is mainly cover difference between difference among unit , integration and e2e testing and how to perform in angular. Please let me know if you are looking for any specific questions?
@suen-tech7 ай бұрын
Thank you
@kavinkumar7 ай бұрын
Hi Kumar, how the deep copy is handling the function , whats the type of d key here ?
@kyprogramming7 ай бұрын
Hi Kavin , thank you for your comment.. JavaScript doesn't have a function data type but when we find the data type of a function using the typeof operator, we find that it returns a function. This is because a function is an object in JavaScript. Ideally the data type of a function should return an object but instead, it returns a function. I hope, I have answered for your query.
@ashishkushwaha87737 ай бұрын
very well explained. keep it up
@kyprogramming7 ай бұрын
Thank you Ashish for your comment. 👍
@ashishkushwaha87737 ай бұрын
great content
@kyprogramming7 ай бұрын
Thank you Ashish for your comment!
@prasantakumarroutray21058 ай бұрын
how excellent ur teaching style....super se upper
@kyprogramming8 ай бұрын
Thank you Prasanta!
@48_ritusharma468 ай бұрын
Well explained sir
@shwetabhat99818 ай бұрын
Great content sir . Thank you for the efforts . Keep growing 🎉
@kyprogramming8 ай бұрын
Thank you Sweta for your appreciation and liking my contents.
@xaini-1378 ай бұрын
after esm:true :getting error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/xainis/Documents/typescript/typePost/src/index.ts
@kyprogramming8 ай бұрын
Please install ts-node npm install -g ts-node And also remove type:module from package.json It should be working as expected. Please let me know if still you are facing issue..
@xaini-1378 ай бұрын
@@kyprogramming already installed nodemon and ts-node
@kyprogramming8 ай бұрын
@@xaini-137 ok please let me know what time will be suitable for you, will setup a Google meet and certainly help you on this. Definitely there is some small configuration would be missing.. Also please let me know which nodejs version are you using?
@xaini-1378 ай бұрын
v20.10.0@@kyprogramming
@kyprogramming8 ай бұрын
@@xaini-137 v20 should be good. Please contact me on telegram t.me/+lZMiJxI4GeNjY2Vl Will setup a meeting to resolve you issues free of cost.
@yanntrad23048 ай бұрын
Hi thanks for this video but when npm run test got the error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
@kyprogramming8 ай бұрын
Hi Yann, have you installed ts-node? and please go step by step all the installation process. Still you are having any issue please connect me on facebook chat, certainly will help you on this.
@Antonym-b5o8 ай бұрын
the same add file .mocharc.json { "extensions": ["ts"], "spec": ["**/*.spec.*"], "node-option": [ "experimental-specifier-resolution=node", "loader=ts-node/esm" ] }
@kyprogramming8 ай бұрын
Could you please try to run following command : npm i tsc -g npm i typescript -g npm i ts-node -g And also ensure you have configuration in tsconfig.json file as "module": "commonjs" This should solve your problem. Please let me know if still you are facing this issue. Thanks
@Antonym-b5o8 ай бұрын
I can't use commonjs. The project has modules. Anyway the my way is works
@kyprogramming8 ай бұрын
@@Antonym-b5o great stuff! glad to hear your issue is resolved.