Skip to content

Commit

Permalink
[test] call $timeout.flush() before debounce tests
Browse files Browse the repository at this point in the history
* Otherwise, the '$http GET' to fetch translation resources
shows up as a deferred task here.

* Referenced from:
srl295@5d9959c
  • Loading branch information
hickeyma committed Mar 6, 2017
1 parent 177408e commit 4dbf3a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ui/public/debounce/__tests__/debounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function init() {
$timeoutSpy = sinon.spy($timeout);

debounce = $injector.get('debounce');

// ensure there is a clean slate before testing deferred tasks
$timeout.flush();
});
}

Expand Down

0 comments on commit 4dbf3a0

Please sign in to comment.