mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 03:06:54 +00:00
verify that eval isn't called after destroy
This commit is contained in:
parent
d82230dea4
commit
89515bb896
@ -102,11 +102,16 @@ define(
|
||||
// Broadcast a destroy event
|
||||
mockScope.$on.mostRecentCall.args[1]();
|
||||
|
||||
testElement.offsetWidth = 300;
|
||||
testElement.offsetHeight = 350;
|
||||
mockScope.$eval.reset();
|
||||
|
||||
// Fire the timeout
|
||||
mockTimeout.mostRecentCall.args[0]();
|
||||
|
||||
// Should NOT have scheduled another timeout
|
||||
expect(mockTimeout.calls.length).toEqual(2);
|
||||
expect(mockScope.$eval).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("triggers a digest cycle when size changes", function () {
|
||||
|
Loading…
Reference in New Issue
Block a user