Explain the concept of stub in node.js.



Explain the concept of stub in node.js...

Answer / Miss.arushi Khanna

{"stub":["A stub is a placeholder function that returns a predefined value or throws an error when called.", "It can be used for testing purposes to replace real functions with simpler versions that provide expected behavior."]}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

How to use async await with promises in node js?

1 Answers  


What is Express in node.js?

1 Answers  


In which language node js is written?

1 Answers  


How to protect node js source code?

1 Answers  


Differentiate between javascript and node.js.

1 Answers  


What is Streams piping in node.js?

1 Answers  


Why is node.js single-threaded?

1 Answers  


How to create function in node js?

1 Answers  


What is chaining in node.js?

1 Answers  


Who has developed Node.js?

1 Answers  


Which database is best for node js?

1 Answers  


Does node.js have a future?

1 Answers  


Categories