Skip to content

Commit f1da3ee

Browse files
authored
Merge pull request #1962 from aadijoshi/patch-1
Set fake timers before calling throttle
2 parents 0ef2dd3 + 393f1ce commit f1da3ee

File tree

1 file changed

+1
-1
lines changed
  • 1-js/06-advanced-functions/09-call-apply-decorators/04-throttle/_js.view

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/09-call-apply-decorators/04-throttle/_js.view/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ describe("throttle(f, 1000)", function() {
77
}
88

99
before(function() {
10-
f1000 = throttle(f, 1000);
1110
this.clock = sinon.useFakeTimers();
11+
f1000 = throttle(f, 1000);
1212
});
1313

1414
it("the first call runs now", function() {

0 commit comments

Comments
 (0)