mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
Addressing issues from code review
This commit is contained in:
@ -84,24 +84,6 @@ define(
|
||||
expect(callback).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("adds listeners to the 'after' state by default", function(){
|
||||
expect(navigationService.callbacks.after).toBeUndefined();
|
||||
navigationService.addListener(function(){});
|
||||
expect(navigationService.callbacks.after).toBeDefined();
|
||||
expect(navigationService.callbacks.after.length).toBe(1);
|
||||
});
|
||||
|
||||
it("allows navigationService events to be prevented", function(){
|
||||
var callback = jasmine.createSpy("callback"),
|
||||
navigationResult;
|
||||
callback.andReturn(false);
|
||||
navigationService.addListener(callback, "before");
|
||||
navigationResult = navigationService.setNavigation({});
|
||||
expect(callback).toHaveBeenCalled();
|
||||
expect(navigationResult).toBe(false);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user