Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Commit 444aa7f

Browse files
bqnguyen94Bouncey
authored andcommitted
fix(seed): Add length check for component find (#16678)
Closes #16677 fix(seed): Use triple equal
1 parent e0aded6 commit 444aa7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

challenges/03-front-end-libraries/react.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@
590590
"tests": [
591591
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(TypesOfFood)); return mockedComponent.children().type() === 'div'; })(), 'message: The <code>TypesOfFood</code> component should return a single <code>div</code> element.');",
592592
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(TypesOfFood)); return mockedComponent.children().childAt(1).name() === 'Fruits'; })(), 'message: The <code>TypesOfFood</code> component should return the <code>Fruits</code> component.');",
593-
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(TypesOfFood)); return (mockedComponent.find('Fruits').children().find('NonCitrus') && mockedComponent.find('Fruits').children().find('Citrus')); })(), 'message: The <code>Fruits</code> component should return the <code>NonCitrus</code> component and the <code>Citrus</code> component.');",
593+
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(TypesOfFood)); return (mockedComponent.find('Fruits').children().find('NonCitrus').length === 1 && mockedComponent.find('Fruits').children().find('Citrus').length === 1); })(), 'message: The <code>Fruits</code> component should return the <code>NonCitrus</code> component and the <code>Citrus</code> component.');",
594594
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(TypesOfFood)); return mockedComponent.children().childAt(2).name() === 'Vegetables'; })(), 'message: The <code>TypesOfFood</code> component should return the <code>Vegetables</code> component below the <code>Fruits</code> component.');"
595595
],
596596
"solutions": [

0 commit comments

Comments
 (0)