From 751704a8c2f3bb5b2f8d5a2155305a8658dcabe5 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Thu, 23 Mar 2023 21:04:15 +1100 Subject: [PATCH] Implemented jest test for Pokemon Card component (part 2): export formatNumber --- src/features/Pokedex/Pokemon/Pokemon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/Pokedex/Pokemon/Pokemon.tsx b/src/features/Pokedex/Pokemon/Pokemon.tsx index d9654ae..4e5b8e3 100644 --- a/src/features/Pokedex/Pokemon/Pokemon.tsx +++ b/src/features/Pokedex/Pokemon/Pokemon.tsx @@ -10,7 +10,7 @@ export interface PokemonProps { types: string[]; } -function formatNumber(num: number) { +export function formatNumber(num: number) { return '#' + num.toString().padStart(3, '0'); }