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