Question: Q 1 9 . An application uses Momentjs library for date manipulation, which is available on windows object at global level. While testing a functionality

Q19. 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
 Q19. An application uses Momentjs library for date manipulation, which is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!