Skip to content

Commit 9b0c11d

Browse files
committed
Merge pull request walmik#35 from walmik/develop
Fixed countdown and enabled test
2 parents eccb28e + 7f12c42 commit 9b0c11d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/timer.jquery.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/timer.jquery.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
if (options.repeat) {
6464
duration += options.duration;
6565
}
66+
67+
// If this is a countdown, then end it as duration has completed
68+
if (options.countdown) {
69+
options.countdown = false;
70+
}
6671
}
6772
}
6873

test/timer.jquery.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
scenarios = [],
55
count = 0; // To print 'Done! on completion of tests
66

7-
/*test('timer supports countdown', function() {
7+
test('timer supports countdown', function() {
88
$('#timer').timer({
99
duration: '3s',
1010
countdown: true,
@@ -23,7 +23,7 @@
2323

2424
start();
2525
}, 3500);
26-
});*/
26+
});
2727

2828
// Timer resets to 0 seconds if reset was called
2929
test('timer resets to 0 seconds if reset was called', function() {

0 commit comments

Comments
 (0)