Merge pull request #5661 from NodeBB/utils-rtrim

Deprecate non-standard `String.prototype.rtrim`
This commit is contained in:
Barış Soner Uşaklı
2017-05-09 16:44:43 -04:00
committed by GitHub
3 changed files with 17 additions and 8 deletions

View File

@@ -171,4 +171,11 @@ describe('Utility Methods', function () {
}
done();
});
it('`utils.rtrim` should remove trailing space', function (done) {
assert.strictEqual(utils.rtrim(' thing '), ' thing');
assert.strictEqual(utils.rtrim('\tthing\t\t'), '\tthing');
assert.strictEqual(utils.rtrim('\t thing \t'), '\t thing');
done();
});
});