Implemented jest test for Pokemon Card component
parent
27df3a780a
commit
9e48382026
|
@ -0,0 +1,15 @@
|
|||
import { formatNumber } from './Pokemon';
|
||||
|
||||
describe('Test Functions', () => {
|
||||
describe('formatNumber', () => {
|
||||
it('should format single digit integer correctly', () => {
|
||||
expect(formatNumber(6)).toBe('#006');
|
||||
});
|
||||
it('should format double digit integer correctly', () => {
|
||||
expect(formatNumber(16)).toBe('#016');
|
||||
});
|
||||
it('should format triple digit integer correctly', () => {
|
||||
expect(formatNumber(116)).toBe('#116');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue