remove $applyAsync test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-03-28 14:04:26 +02:00
parent 49ae4d0e74
commit 1959340163
1 changed files with 0 additions and 4 deletions

View File

@ -43,12 +43,10 @@ describe('Item', () => {
describe('scrollToLine ()', () => {
it('should assign $location then call anchorScroll using controller value', () => {
jest.spyOn(controller.$, '$applyAsync');
jest.spyOn(controller, '$anchorScroll');
controller.lineFk = 1;
controller.scrollToLine('invalidValue');
expect(controller.$.$applyAsync).toHaveBeenCalledWith(jasmine.any(Function));
$scope.$apply();
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);
@ -56,12 +54,10 @@ describe('Item', () => {
});
it('should assign $location then call anchorScroll using received value', () => {
jest.spyOn(controller.$, '$applyAsync');
jest.spyOn(controller, '$anchorScroll');
controller.lineFk = undefined;
controller.scrollToLine(1);
expect(controller.$.$applyAsync).toHaveBeenCalledWith(jasmine.any(Function));
$scope.$apply();
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);