aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts')
-rw-r--r--src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts b/src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts
index d8fe6c7..5d73a14 100644
--- a/src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts
+++ b/src/app/shared/modules/tidy-table/table-filter.pipe.spec.ts
@@ -31,4 +31,15 @@ describe('TableFilterPipe', () => {
const pipe = new TableFilterPipe();
expect(pipe).toBeTruthy();
});
+ it('filter table based on input ', () => {
+ const pipe = new TableFilterPipe();
+
+ let data =[
+ {'vnf-type':'vnf1','vnfc-type':'vnfc1','artifact-name':'artf1'},
+ {'vnf-type':'vnf2','vnfc-type':'vnfc2','artifact-name':'artf2'}
+
+ ]
+ let filter = ['vnf-type', 'vnfc-type', 'artifact-name'];
+ expect(pipe.transform(data,'vnf1',filter).length).toBe(1);
+ });
});