You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new component to display the date for when page was loaded
the function used for returning current date must be in 'methods:' not 'computed:'
because the later is cached on reactive dependencies so getting current time is not going to work.
We need to mock the current time in the test. Jasmine's Clock class is made for that purpose.
Just make sure Jasmine.clock() is called before the component is mounted otherwise
the component will pick up the real Date class.
0 commit comments