From c11bf0d02e77bbde33b5c059a479335f83e923c8 Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Wed, 16 Sep 2020 00:23:48 +0900 Subject: [PATCH] fix(curriculum): restrictive test for use map to dynamically render challenge (#39581) --- ...se-array.map-to-dynamically-render-elements.english.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/english/03-front-end-libraries/react/use-array.map-to-dynamically-render-elements.english.md b/curriculum/challenges/english/03-front-end-libraries/react/use-array.map-to-dynamically-render-elements.english.md index 800d18d12a..d7528591a4 100644 --- a/curriculum/challenges/english/03-front-end-libraries/react/use-array.map-to-dynamically-render-elements.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/react/use-array.map-to-dynamically-render-elements.english.md @@ -58,7 +58,7 @@ tests: }; const state_2 = () => { const nodes = mockedComponent.find('ul').find('li'); - return { nodes, text: nodes.reduce((t, n) => t + n.text(), '') }; + return { nodes, text: nodes.reduce((t, n) => t + n.text().trim(), '') }; }; const setInput_2 = () => { return simulateChange( @@ -71,7 +71,7 @@ tests: }; const state_3 = () => { const nodes = mockedComponent.find('ul').find('li'); - return { nodes, text: nodes.reduce((t, n) => t + n.text(), '') }; + return { nodes, text: nodes.reduce((t, n) => t + n.text().trim(), '') }; }; const awaited_state_1 = state_1(); const awaited_setInput = setInput(); @@ -84,8 +84,8 @@ tests: awaited_state_1.length === 0 && awaited_state_2.nodes.length === 3 && awaited_state_3.nodes.length === 6 && - awaited_state_2.text === 'testA testB testC' && - awaited_state_3.text === 't1 t2 t3 t4 t5 t6' + awaited_state_2.text === 'testAtestBtestC' && + awaited_state_3.text === 't1t2t3t4t5t6' ); })(); "