From c0d3ab992b310d744a1209bd51d7a0ccf7bd3c7a Mon Sep 17 00:00:00 2001 From: Ricardo Busquet Date: Sat, 1 Aug 2020 17:21:08 -0400 Subject: [PATCH 1/2] Tests should pass by following the koala I'm not quite sure if that was intentional, but I couldn't get the test to pass by following the koala. --- src/exercise/02.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/exercise/02.js b/src/exercise/02.js index 57990f56..a5c586c4 100644 --- a/src/exercise/02.js +++ b/src/exercise/02.js @@ -84,12 +84,7 @@ function PokemonInfo({pokemonName}) { } else if (status === 'pending') { return } else if (status === 'rejected') { - return ( -
- There was an error:{' '} -
{error.message}
-
- ) + throw error } else if (status === 'resolved') { return } From 4339a0dfa41dd86cc1512b6121a52e61d20430c2 Mon Sep 17 00:00:00 2001 From: Ricardo Busquet Date: Sat, 1 Aug 2020 17:23:08 -0400 Subject: [PATCH 2/2] Add impossible throw --- src/exercise/02.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/exercise/02.js b/src/exercise/02.js index a5c586c4..eae9dafc 100644 --- a/src/exercise/02.js +++ b/src/exercise/02.js @@ -88,6 +88,8 @@ function PokemonInfo({pokemonName}) { } else if (status === 'resolved') { return } + + throw new Error('This should be impossible') } function App() {