Hi!
I'm trying to make unit tests for a controller that uses moment.js to
handle three dates of a week. My testing framework is jasmine and my
AngularJS version is v1.3.15
Basically I have an init() function that sets them and I want to check if
all of them are properly set in the controller.
var myController = this;
myController.init = function () {
myController.currentDate = moment(new Date()).format('DD-MM-YYYY');
myController.startOfWeek =
moment(currentDate).startOf('week').format('DD-MM-YYYY');
myController.endOfWeek =
moment(currentDate).startOf('week').format('DD-MM-YYYY');
};
At this point I'm not sure if this approach is correct and/or if I should
test this stuff here.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.