This commit is contained in:
Carlos Jimenez Ruiz 2019-02-12 14:40:13 +01:00
parent 8ef6db9017
commit 9c0613e8e7
3 changed files with 102 additions and 119 deletions

View File

@ -28,19 +28,5 @@ describe('factory vnModuleLoader', () => {
expect(result).toEqual(jasmine.any(Promise));
});
it('should return an error if the module wasnt loaded', done => {
vnModuleLoader._loaded.myModule = false;
vnModuleLoader.load('myModule', {myValidations: () => {}})
.then(() => {
done.fail('this must fail');
})
.catch(error => {
expect(error.toString()).toEqual(`Error: Module dependency loop detected: myModule`);
done();
});
$scope.$apply();
});
});
});

View File

@ -1,14 +1,13 @@
import './index.js';
describe('Item', () => {
describe('Component vnTicketDescriptorPopover', () => {
describe('ticket Component vnTicketDescriptorPopover', () => {
let $httpBackend;
let $scope;
let controller;
let $element;
let $timeout;
beforeEach(ngModule('item'));
beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$timeout_) => {
$httpBackend = _$httpBackend_;
@ -122,5 +121,5 @@ describe('Item', () => {
expect(controller.ticket).toEqual(response);
});
});
});
});

View File

@ -1,12 +1,10 @@
import './index.js';
describe('Item Component vnTicketDescriptor', () => {
describe('Ticket Component vnTicketDescriptor', () => {
let $httpBackend;
let controller;
beforeEach(() => {
ngModule('item');
});
beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;