From 4604ede346012bae2c75349452448f5947a58647 Mon Sep 17 00:00:00 2001 From: Maxim Orlov Date: Thu, 29 Jan 2015 00:23:04 +0100 Subject: [PATCH 1/4] fix typo Title Case a Sentence --- seed_data/bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 871105fe64..370cb08e1c 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -102,7 +102,7 @@ "Return the provided string with the first letter of each word capitalized.", "For the purpose of this exercise, you should also capitalize connecting words like 'the' and 'of'." ], - "challengeEntryPoint": "titleCase(\"I'm a little tea pot\")", + "challengeEntryPoint": "titleCase(\"I'm a little tea pot\");", "challengeSeed": "function titleCase(str) {\n return str;\r\n}", "tests": [ "expect(titleCase(\"I'm a little tea pot\")).to.be.a('String');", From ea24eae922de9b9b2ca3685d82ded506dcf7fd93 Mon Sep 17 00:00:00 2001 From: itchytag Date: Wed, 28 Jan 2015 18:35:06 -0500 Subject: [PATCH 2/4] Use should.eql to compare arrays When trying to pass the "Return Largest Numbers in Arrays" challenge, I seem to be unable to pass the provided tests. I'm not familiar with Chai, but it would seem that we need to switch to .eql rather than === or should.equal when comparing two arrays to deeply compare the values rather than comparing objects. --- seed_data/bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 370cb08e1c..959cd46ac2 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -124,8 +124,8 @@ "challengeSeed": "function largestOfFour(arr) {\n // You can do this!\r\n return arr;\r\n}", "tests": [ "expect(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).to.be.a('array');", - "(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).should.equals([5,27,39,1001]);", - "assert(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]) === [9,35,97,1000000]);" + "(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).should.eql([5,27,39,1001]);", + "assert(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]).should.eql([9,35,97,1000000]));" ] }, From e1638648294d90ef8b67967affe9c161fa44f924 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Wed, 28 Jan 2015 21:46:06 -0500 Subject: [PATCH 3/4] Fix for challenge Title Case --- seed_data/bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 370cb08e1c..186018650e 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -108,7 +108,7 @@ "expect(titleCase(\"I'm a little tea pot\")).to.be.a('String');", "expect(titleCase(\"I'm a little tea pot\")).to.equal(\"I'm A Little Tea Pot\");", "expect(titleCase(\"sHoRt AnD sToUt\")).to.equal(\"Short And Stout\");", - "expect(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")).to.equal(\"Here Is My Handle Here Is My Spout\");" + "expect(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")).to.equal(\"Here Is My Handle Here Is My Spout\");" ] }, { From b7ed22711602386d8eebf4ffb6640dbbead57284 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Wed, 28 Jan 2015 21:53:47 -0500 Subject: [PATCH 4/4] Fix for largest of arrays --- seed_data/bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 186018650e..369ee60fd6 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -124,8 +124,8 @@ "challengeSeed": "function largestOfFour(arr) {\n // You can do this!\r\n return arr;\r\n}", "tests": [ "expect(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).to.be.a('array');", - "(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).should.equals([5,27,39,1001]);", - "assert(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]) === [9,35,97,1000000]);" + "(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).should.eql([5,27,39,1001]);", + "assert(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]).should.eql([9,35,97,1000000]));" ] },