Skip to content

Commit 1345584

Browse files
author
Taksh
committed
Fix saveGif to silent no-op for non-positive duration
1 parent 36731d1 commit 1345584

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/unit/image/downloading.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,13 @@ suite('p5.prototype.saveGif', function() {
370370
});
371371
});
372372

373-
test('should throw an error if duration is less than or equal to 0', function() {
374-
assert.throws(function() {
373+
test('should silently return if duration is less than or equal to 0', function() {
374+
assert.doesNotThrow(function() {
375375
myp5.saveGif('myGif', 0);
376-
}, RangeError);
377-
assert.throws(function() {
376+
});
377+
assert.doesNotThrow(function() {
378378
myp5.saveGif('myGif', -5);
379-
}, RangeError);
379+
});
380380
});
381381

382382
testWithDownload('should download a GIF', async function(blobContainer) {

0 commit comments

Comments
 (0)