Implemented jest test for Pokemon Card component (part 2): export formatNumber
parent
9e48382026
commit
751704a8c2
|
@ -10,7 +10,7 @@ export interface PokemonProps {
|
||||||
types: string[];
|
types: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(num: number) {
|
export function formatNumber(num: number) {
|
||||||
return '#' + num.toString().padStart(3, '0');
|
return '#' + num.toString().padStart(3, '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue