Skip to content

Commit 972b465

Browse files
committed
added test case
1 parent 0e3df94 commit 972b465

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/unit/utilities/string_functions.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ suite('String functions', function() {
111111
result = myp5.nf(num, 3, 0);
112112
assert.equal(result, '123');
113113
});
114+
115+
test('should return correct string', function() {
116+
var num = -123;
117+
result = myp5.nf(num, 5);
118+
assert.equal(result, '-00123');
119+
});
114120
});
115121

116122
suite('p5.prototype.nfc', function() {

0 commit comments

Comments
 (0)