Implemented jest test for Pokemon Card component
This commit is contained in:
parent
27df3a780a
commit
9e48382026
15
src/features/Pokedex/Pokemon/Pokemon.test.ts
Normal file
15
src/features/Pokedex/Pokemon/Pokemon.test.ts
Normal file
@ -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…
x
Reference in New Issue
Block a user