84d2ff4b6731af4bc3b2b4dd9e0830237e3c7384
[vid.git] / vid-webpack-master / src / app / shared / pipes / capitalize / capitalize-and-format.pipe.spec.ts
1
2 import {CapitalizeAndFormatPipe} from "./capitalize-and-format.pipe";
3
4 describe('Capitalize And Format Pipe', () => {
5   let capitalizeAndFormatPipe: CapitalizeAndFormatPipe;
6
7   beforeEach(() => {
8     capitalizeAndFormatPipe = new CapitalizeAndFormatPipe();
9   });
10
11   it('Capitalize And Format Pipe should be defined', () => {
12     expect(capitalizeAndFormatPipe).toBeDefined();
13   });
14
15   it('Capitalize And Format Pipe :  (UPPERCASE)', ()=> {
16     let result: string = capitalizeAndFormatPipe.transform('PENDING');
17     expect(result).toEqual('Pending');
18   });
19
20   it('Capitalize And Format Pipe (UPPERCASE) and Underscore should replace by -', ()=> {
21     let result: string = capitalizeAndFormatPipe.transform('IN_PROGRESS');
22     expect(result).toEqual('In-progress');
23   });
24
25 });