From 3cda2df32f17ee304fd34441a58e72becc0639b6 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 4 Sep 2018 13:38:46 +0530 Subject: order-by.pipe- added test case added test case to test and cover order orderByComparator() when orderby parameter is number. Issue-ID: APPC-1064 Change-Id: Ia3c1c17d4b95f58559c2467769b9071ed08a32ee Signed-off-by: Arundathi Patil --- src/app/shared/modules/tidy-table/order-by.pipe.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/app/shared/modules') diff --git a/src/app/shared/modules/tidy-table/order-by.pipe.spec.ts b/src/app/shared/modules/tidy-table/order-by.pipe.spec.ts index c856ebd..39d842e 100644 --- a/src/app/shared/modules/tidy-table/order-by.pipe.spec.ts +++ b/src/app/shared/modules/tidy-table/order-by.pipe.spec.ts @@ -71,4 +71,14 @@ describe('OrderByPipe', () => { ] expect(pipe.transform(data,undefined,false).length).toBe(2); }); + + it('should test orderByComparator when orderby parmeter is number ', () => { + const pipe = new OrderBy(); + + let data =[ + {'vnf-type': '311','vnfc-type':'vnfc1','artifact-name':'artf1'}, + {'vnf-type':'316','vnfc-type':'vnfc2','artifact-name':'artf2'} + ] + pipe.transform(data,"vnf-type",false); + }); }); -- cgit 1.2.3-korg