indexOf() instead of includes()

This commit is contained in:
quentin 2017-02-20 15:42:50 -05:00
parent 15d1f6e647
commit dd77bbc46d
2 changed files with 6 additions and 6 deletions

View File

@ -334,7 +334,7 @@
""
],
"tests": [
"assert(ownProps.includes('name') && ownProps.includes('numLegs'), 'message: <code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.');",
"assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1, 'message: <code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.');",
"assert(!/\\Object.keys/.test(code), 'message: Solve this challenge without using the built in method <code>Object.keys()</code>.');"
],
"solutions": [
@ -414,8 +414,8 @@
""
],
"tests": [
"assert(ownProps.includes('name'), 'message: The <code>ownProps</code> array should include <code>\"name\"</code>.');",
"assert(prototypeProps.includes('numLegs'), 'message: The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.');",
"assert(ownProps.indexOf('name') !== -1, 'message: The <code>ownProps</code> array should include <code>\"name\"</code>.');",
"assert(prototypeProps.indexOf('numLegs') !== -1, 'message: The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.');",
"assert(!/\\Object.keys/.test(code), 'message: Solve this challenge without using the built in method <code>Object.keys()</code>.');"
],
"solutions": [

View File

@ -2579,9 +2579,9 @@
],
"tests": [
"assert(Object.keys(undirectedAdjList).length === 4, 'message: <code>undirectedAdjList</code> should only contain four nodes.');",
"assert(undirectedAdjList.James.includes(\"Jeff\") && undirectedAdjList.Jeff.includes(\"James\"), 'message: There should be an edge between <code>Jeff</code> and <code>James</code>.');",
"assert(undirectedAdjList.Jill.includes(\"Jenny\") && undirectedAdjList.Jill.includes(\"Jenny\"), 'message: There should be an edge between <code>Jill</code> and <code>Jenny</code>.');",
"assert(undirectedAdjList.Jeff.includes(\"Jenny\") && undirectedAdjList.Jenny.includes(\"Jeff\"), 'message: There should be an edge between <code>Jeff</code> and <code>Jenny</code>.');"
"assert(undirectedAdjList.James.indexOf(\"Jeff\") !== -1 && undirectedAdjList.Jeff.indexOf(\"James\") !== -1, 'message: There should be an edge between <code>Jeff</code> and <code>James</code>.');",
"assert(undirectedAdjList.Jill.indexOf(\"Jenny\") !== -1 && undirectedAdjList.Jill.indexOf(\"Jenny\") !== -1, 'message: There should be an edge between <code>Jill</code> and <code>Jenny</code>.');",
"assert(undirectedAdjList.Jeff.indexOf(\"Jenny\") !== -1 && undirectedAdjList.Jenny.indexOf(\"Jeff\") !== -1, 'message: There should be an edge between <code>Jeff</code> and <code>Jenny</code>.');"
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",