1 import { PathPipe } from './path.pipe';
3 describe('PathPipe', () => {
4 it('create an instance', () => {
5 const pipe = new PathPipe();
6 expect(pipe).toBeTruthy();
9 it('should transform the path', () => {
10 const pipe = new PathPipe();
11 expect(pipe.transform('/a/b/c/d')).toBe('/a/.../d');
14 it('should transform the path with no slash at beginning', () => {
15 const pipe = new PathPipe();
16 expect(pipe.transform('a/b/c/d')).toBe('a/.../d');