remove $applyAsync test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
49ae4d0e74
commit
1959340163
|
@ -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}`);
|
||||
|
|
Loading…
Reference in New Issue