From 9f82aec5693b6f15ce07ee9549525749399d1b1d Mon Sep 17 00:00:00 2001 From: harttle Date: Tue, 2 May 2017 22:06:07 +0800 Subject: [PATCH] add test case for truncate --- test/filters.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/filters.js b/test/filters.js index 8e273b8d1..ac61caa27 100644 --- a/test/filters.js +++ b/test/filters.js @@ -297,6 +297,9 @@ describe('filters', function () { return test('{{ "Ground control to Major Tom." | truncate: 20, "" }}', 'Ground control to Ma') }) + it('should not truncate when short enough', function () { + return test('{{ "12345" | truncate: 5 }}', '12345') + }) }) describe('truncatewords', function () {