Fixed the test cases,added sonar config
[portal.git] / portal-FE-common / src / app / shared / pipes / elipsis / elipsis.pipe.spec.ts
index 22a477d..a553fb4 100644 (file)
 import { ElipsisPipe } from './elipsis.pipe';
 
 describe('ElipsisPipe', () => {
+  let pipe;
   it('create an instance', () => {
-    const pipe = new ElipsisPipe();
+     pipe = new ElipsisPipe();
     expect(pipe).toBeTruthy();
   });
+  it('removeImage should return stubbed value', () => {
+    spyOn(pipe, 'transform').and.callThrough();
+    pipe.transform('PipeTest','2');
+    expect(pipe.transform).toHaveBeenCalledWith('PipeTest','2');
+  });
 });