Files
agenda-web/src/app/pipes/upperfirst-pipe.spec.ts

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);
});
});