22 lines
541 B
TypeScript
22 lines
541 B
TypeScript
import { UpperfirstPipe } from './upperfirst-pipe';
|
|
|
|
describe('UpperfirstPipe', () => {
|
|
let pipe: UpperfirstPipe;
|
|
|
|
beforeEach(() => {
|
|
pipe = new UpperfirstPipe();
|
|
});
|
|
|
|
it('create an instance', () => {
|
|
const pipe = new UpperfirstPipe();
|
|
expect(pipe).toBeTruthy();
|
|
});
|
|
|
|
it('should uppercase only the first letter on a string', () => {
|
|
const unformattedString = "today is a great day";
|
|
const expectedString = "Today is a great day";
|
|
expect(pipe.transform(unformattedString)).toBe(expectedString);
|
|
});
|
|
|
|
});
|