From f04019a7902c8ba3f51fa80614595b349a5c490d Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Wed, 17 Jun 2015 23:30:08 +0200 Subject: [PATCH 1/6] 'No repeats please' test fix. #941 --- challenges/advanced-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index e14504dba4..978ebe81ce 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -230,7 +230,7 @@ "permAlone('aab');" ], "tests": [ - "expect(permAlone('aab')).to.be.a.number;", + "expect(permAlone('aab')).to.be.a('number');", "expect(permAlone('aab')).to.equal(2);", "expect(permAlone('aaa')).to.equal(0);", "expect(permAlone('aabb')).to.equal(8);", From cddc1b6c6a147c44d71e8ed8db17b17577c5beb1 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Thu, 18 Jun 2015 11:56:13 +0200 Subject: [PATCH 2/6] More test cases for 'Seek and Destroy' #942 --- challenges/basic-bonfires.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index df4b6bc16c..5a553f92ed 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -656,7 +656,10 @@ ], "tests": [ "assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1], 'should remove correct values from an array');", - "assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1], 'should remove correct values from an array');" + "assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1], 'should remove correct values from an array');", + "assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1], 'should accept more than two additional arguments');", + "assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), [], 'should remove correct values from an array');", + "assert.deepEqual(destroyer(['tree', 'hamburger', 53], 'tree', 53), ['hamburger'], 'should handle NaN-elements');" ], "MDNlinks": [ "Arguments object", From 14225ec4bd66985dba2375cf1c36e33bd07daa84 Mon Sep 17 00:00:00 2001 From: rcw271828 Date: Thu, 18 Jun 2015 20:36:33 -0400 Subject: [PATCH 3/6] Update field-guides.json Fixed a typo in languages section of field guides. --- field-guides.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/field-guides.json b/field-guides.json index 2de429b569..9d3e906d16 100644 --- a/field-guides.json +++ b/field-guides.json @@ -863,7 +863,7 @@ "description": [ "
", "

Translation is an all-or-nothing proposal.", - "

We won't be able to add new languages to Free Code Camp until all of our challenges are translated into that langauge.

", + "

We won't be able to add new languages to Free Code Camp until all of our challenges are translated into that language.

", "

In addition to translating these initially, we'll also need to maintain the translation as the challenges are gradually updated.

", "

If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Slack.

", "
" From 07a54c9e0cb0753726c191f6c80d831be6ebf582 Mon Sep 17 00:00:00 2001 From: Brett Guillory Date: Sat, 13 Jun 2015 20:54:43 -0500 Subject: [PATCH 4/6] Fixed a word --- challenges/basic-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index df4b6bc16c..8ecebec116 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -853,7 +853,7 @@ "difficulty": "2.03", "description": [ "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", - "First argument is the sentence the perform the search and replace on.", + "First argument is the sentence to perform the search and replace on.", "Second argument is the word that you will be replacing (before).", "Third argument is what you will be replacing the second argument with (after).", "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'", From 92656fcf2fa7ce709f429003567d9cfa102f7a9a Mon Sep 17 00:00:00 2001 From: Brett Guillory Date: Sat, 13 Jun 2015 23:28:33 -0500 Subject: [PATCH 5/6] Added missing MDN Link This bonfire "Missing letters"seems to be missing an important MDN link to "String.fromCharCode()", which is needed to get the missing character to return for the test. Since the missing character is obviously not in the string supplied, you cannot get the character code for it from the string. --- challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index 8ecebec116..08c797f58c 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -990,7 +990,8 @@ "expect(fearNotLetter('yz')).to.be.undefined;" ], "MDNlinks": [ - "String.charCodeAt()" + "String.charCodeAt()", + "String.fromCharCode()" ], "challengeType": 5, "nameCn": "", From 78fa5449b48842787106f5f85588abee56c7fd0b Mon Sep 17 00:00:00 2001 From: Stephen Wanhella Date: Thu, 18 Jun 2015 02:18:18 -0700 Subject: [PATCH 6/6] Added new test with different max number to Bonfire: Truncate a String Issue 959 --- challenges/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index 08c797f58c..412ed80ad1 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -422,6 +422,7 @@ ], "tests": [ "expect(truncate('A-tisket a-tasket A green and yellow basket', 11)).to.eqls('A-tisket...');", + "expect(truncate('Peter Piper picked a peck of pickled peppers', 14)).to.eqls('Peter Piper...');", "assert(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length) === 'A-tisket a-tasket A green and yellow basket', 'should not truncate if string is = length');", "assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length + 2), 'A-tisket a-tasket A green and yellow basket', 'should not truncate if string is < length');" ],