23 lines
688 B
JavaScript
23 lines
688 B
JavaScript
import './index';
|
|
|
|
describe('component vnUpcomingDeliveries', () => {
|
|
let $scope;
|
|
let controller;
|
|
|
|
beforeEach(ngModule('zone'));
|
|
|
|
beforeEach(inject(($componentController, $rootScope) => {
|
|
$scope = $rootScope.$new();
|
|
const $element = angular.element(`<vn-upcoming-deliveries></vn-upcoming-deliveries>`);
|
|
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');
|
|
});
|
|
});
|
|
});
|