Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q 1 9 . An application uses Momentjs library for date manipulation, which is available on windows object at global level. While testing a functionality
Q An application uses Momentjs library for date manipulation, which is available on windows object at global level. While testing a functionality using Jasmine, what a developer must do to test this functionality?
Options
As it is available in app at windows object nothing needs to be done. Its reference will be available inside the test file and can be used easily
Developer must not test this functionality as it depends on other library
Moment needs to be included in the test explicitly and attached in windows object inside beforeEach method, then it be available during test run
Developer can mock it using a mock api and then use it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started