import './index'; describe('component vnUpcomingDeliveries', () => { let $scope; let controller; beforeEach(ngModule('zone')); beforeEach(angular.mock.inject(($componentController, $rootScope) => { $scope = $rootScope.$new(); const $element = angular.element(``); controller = $componentController('vnUpcomingDeliveries', {$element, $scope}); })); describe('getWeekDay()', () => { it('should retrieve a weekday for a json passed', () => { let jsonDate = '1970-01-01T22:00:00.000Z'; expect(controller.getWeekDay(jsonDate)).toEqual('Thursday'); }); }); });