Skip to content

Commit

Permalink
Merge pull request #13 from jaredwray/updating-tests-for-downcase-and…
Browse files Browse the repository at this point in the history
…-lowercase

updating tests for downcase and lowercase
  • Loading branch information
jaredwray committed Sep 19, 2023
2 parents 51bb323 + 161ed8f commit cb2ed9b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Visit the: [code](lib/string.js) | [unit tests](test/string.js) | [issues](https
* **[chop](#chop)** ([code](lib/string.js#L125) | [tests](test/string.js#L58))
* **[dashcase](#dashcase)** ([code](lib/string.js#L143) | [tests](test/string.js#L73))
* **[dotcase](#dotcase)** ([code](lib/string.js#L162) | [tests](test/string.js#L88))
* **[downcase](#downcase)** ([code](lib/string.js#L182) | [no tests])
* **[downcase](#downcase)** ([code](lib/string.js#L182) | [tests](test/string.js#L391))
* **[ellipsis](#ellipsis)** ([code](lib/string.js#L202) | [tests](test/string.js#L103))
* **[hyphenate](#hyphenate)** ([code](lib/string.js#L223) | [tests](test/string.js#L118))
* **[isString](#isString)** ([code](lib/string.js#L240) | [tests](test/string.js#L129))
Expand Down
18 changes: 18 additions & 0 deletions test/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,5 +387,23 @@ describe('string', function() {
assert.equal(fn(), 'BENDER SHOULD NOT BE ALLOWED ON TV');
});
});

describe('downcase', function() {
it('should do lower case', function() {
var fn = hbs.compile('{{downcase "ABC"}}');
assert.equal(fn(), 'abc');
});
});

describe('lowercase helper with object', function() {
it('should do lower case', function() {
var str = {};
str.fn = function() {
return 'FOO BAR BAZ';
};
var result = helpers.string().lowercase(str);
assert.equal(result, 'foo bar baz');
});
});
});

0 comments on commit cb2ed9b

Please sign in to comment.