InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which code coverage has boolean sub expressions evaluate to both true and false? |
|
Answer» Which code COVERAGE has BOOLEAN sub expressions evaluate to both true and false? |
|
| 2. |
Which among the following is said to have a preprogrammed behavior and as well as preprogrammed expectations? |
|
Answer» Which among the following is said to have a preprogrammed behavior and as WELL as preprogrammed expectations? |
|
| 3. |
To use Eslint on the machine, node.js is must. |
|
Answer» To use Eslint on the MACHINE, node.js is must. |
|
| 4. |
By default Eslint does not have a parser. |
|
Answer» By default Eslint does not have a parser. |
|
| 5. |
nyc can fail tests if the coverage falls under a threshold using ___________. |
|
Answer» nyc can fail tests if the COVERAGE FALLS under a threshold using ___________. |
|
| 6. |
Which among the following Javascript library is used to bring out lines of code that deviate from coding style guides? |
|
Answer» Which AMONG the following Javascript library is used to bring out lines of code that DEVIATE from coding STYLE guides? |
|
| 7. |
Write an example of spy wrapping on existing method |
|
Answer» Write an example of spy wrapping on EXISTING METHOD |
|
| 8. |
Which of the following is a Istanbul plugin that gives support for ES6/ES2015? |
|
Answer» Which of the following is a Istanbul plugin that gives support for ES6/ES2015? |
|
| 9. |
Clover is a type of istanbul reporter which output reports in __________ format. |
|
Answer» Clover is a TYPE of istanbul reporter which output reports in __________ format. |
|
| 10. |
By default, Mocha checks unit tests using the path ________ |
|
Answer» By DEFAULT, MOCHA checks unit tests using the path ________ |
|
| 11. |
Which of the following is an assertion library? |
|
Answer» Which of the following is an assertion library? |
|
| 12. |
Which of the following is the ECMA 7 feature that allows promises without sending callback to .then and instead the value will be returned by the asyn |
|
Answer» Which of the FOLLOWING is the ECMA 7 feature that allows PROMISES WITHOUT sending CALLBACK to .then and instead the value will be returned by the asynchrnous function? |
|
| 13. |
Which of the following is not a javascript linter? |
|
Answer» Which of the following is not a javascript linter? |
|
| 14. |
________ are fake methods with pre-programmed behaviour and pre-programmed expectation. |
|
Answer» ________ are fake methods with pre-programmed behaviour and pre-programmed expectation. |
|
| 15. |
stub.yields() is used to call the first callback when anyargument is passed to it. |
|
Answer» stub.yields() is used to call the FIRST callback when anyargument is passed to it. |
|
| 16. |
Which of the chai assertion styles do not work in Internet Explorer? |
|
Answer» Which of the chai assertion styles do not WORK in Internet Explorer? |
|
| 17. |
Which of the following is the ECMA 7 feature that allows promises without sending callback to. |
|
Answer» Which of the following is the ECMA 7 feature that allows promises without SENDING CALLBACK to. |
|
| 18. |
Which type of testing involves testing the individual functions or classes by mocking input and making sure the output is as expected? |
|
Answer» Which type of testing involves testing the individual functions or CLASSES by mocking input and making sure the output is as expected? |
|
| 19. |
Which of the following is the unit testing functionality that spawns a webserver and runs source code against test code for configured browsers? |
|
Answer» Which of the following is the UNIT testing functionality that spawns a webserver and runs source code against test code for configured BROWSERS? |
|
| 20. |
Which among the following test double is used to replace a target function with pre-programmed method directing to specific path? |
|
Answer» Which among the following test double is USED to replace a TARGET function with pre PROGRAMMED method directing to specific path? |
|
| 21. |
Mocks have built-in assertions. |
|
Answer» MOCKS have BUILT in assertions. Choose the correct option from below LIST (1)True (2)False Answer:-(1)True |
|
| 22. |
___________ are specified using -formatter or -f on command line. |
|
Answer» ___________ are specified using formatter or F on COMMAND line. |
|
| 23. |
What is the Testdouble that are fake methods with preprogrammed behavior and expectation? |
|
Answer» What is the Testdouble that are FAKE methods with preprogrammed BEHAVIOR and EXPECTATION? |
|
| 24. |
When spying an original function we need to restore the original function using __________. |
|
Answer» When spying an original function we need to restore the original function USING __________. |
|
| 25. |
Which among the following is said to have a preprogrammed behavior? |
|
Answer» Which among the FOLLOWING is SAID to have a preprogrammed behavior? |
|
| 26. |
Assertion library does the actual verification of the test results. |
|
Answer» ASSERTION library does the actual verification of the test results. Choose the CORRECT option from below LIST (1)False (2)TRUE Answer:-(2)True |
|
| 27. |
Which of the following test double is used to record function calls, arguments and exceptions thrown? |
|
Answer» Which of the FOLLOWING test double is used to record function CALLS, arguments and exceptions THROWN? |
|
| 28. |
Istanbul uses ___________ JavaScript parser for generating measured version of code. |
|
Answer» Istanbul uses ___________ JavaScript parser for generating measured version of code. |
|
| 29. |
Lambdas lexically bind _______ and cannot access the mocha content. So passing arrow functions in Mocha is discouraged. |
|
Answer» Lambdas lexically BIND _______ and cannot ACCESS the mocha content. So passing arrow FUNCTIONS in Mocha is discouraged. |
|
| 30. |
Is the following unit testing an asynchronous code is valid? |
|
Answer» Is the following unit testing an asynchronous code is VALID? |
|
| 31. |
What happens if an error is thrown inside 'then'? |
|
Answer» What happens if an ERROR is thrown inside then? |
|
| 32. |
What is default style of interface of Mocha framework? |
|
Answer» What is default STYLE of interface of MOCHA framework? |
|
| 33. |
Which of the following is a headless browser that runs on running Javascript? |
|
Answer» Which of the following is a headless browser that runs on RUNNING Javascript? |
|
| 34. |
Each unit test should test one concern only. |
|
Answer» Each UNIT test should test ONE concern only. |
|
| 35. |
In Eslint, linting rules can be turned on or off using javascript comments embedding configuration rules. |
|
Answer» In Eslint, LINTING rules can be TURNED on or off using javascript COMMENTS embedding configuration rules. |
|
| 36. |
The Mocha hook that runs first before executing any tests in a describe() block is ___________. |
|
Answer» The MOCHA hook that runs first before executing any tests in a DESCRIBE() BLOCK is ___________. |
|