merge master into coderbye

This commit is contained in:
Nathan Leniz
2015-02-13 16:56:09 -05:00
4 changed files with 13 additions and 12 deletions

View File

@ -122,7 +122,7 @@ function bonfireExecute() {
userJavaScript = scrapeTests(userJavaScript);
// simple fix in case the user forgets to invoke their function
if (challengeEntryPoint && challengeSeed) {
userJavaScript = challengeEntryPoint + ' ' + userJavaScript;
//userJavaScript = challengeEntryPoint + ' ' + userJavaScript;
}
submit(userJavaScript, function(cls, message) {
if (cls) {

View File

@ -157,13 +157,13 @@
"Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.",
"Note that the three dots at the end add to the string length."
],
"challengeSeed": "function truncate(str, num) {\n // Clear out that junk in your trunc\r\n return str;\r\n}",
"challengeEntryPoint":"truncate('A-tisket a-tasket A green and yellow basket', 11);",
"challengeSeed":"function truncate(str, num) {\n // Clear out that junk in your trunk\r\n return str;\r\n}",
"tests": [
"var string = 'A-tisket a-tasket A green and yellow basket;",
"assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket, 24), 'A-tisket…, should truncate string the given length');",
"assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket, 'A-tisket a-tasket A green and yellow basket.length), string, '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), string, 'should not truncate if string is < length');"
"expect(truncate('A-tisket a-tasket A green and yellow basket', 11)).to.eqls('A-tisket...');",
"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');"
]
},
{
@ -477,10 +477,10 @@
"description": [
"Fill in the object constructor with the methods specified in the tests.",
"Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(), setLastName(), and setFullName().",
"These methods must be the only available means for interacting with the object.",
"There will be some linting errors on the tests. You may safely ignore them. You should see undefined in the console output."
"These methods must be the only available means for interacting with the object."
],
"challengeSeed": "var Person = function(firstAndLast) {\n return firstAndLast;\r\n};\n\nvar bob = new Person('Bob Ross');",
"challengeEntryPoint": "var bob = new Person('Bob Ross');\nbob.getFullName();",
"tests": [
"expect(Object.keys(bob).length).to.eql(6);",
"expect(bob instanceof Person).to.be.true;",
@ -494,7 +494,8 @@
"bob.setLastName('Trees');",
"expect(bob.getLastName()).to.eql('Trees');",
"bob.setFullName('George Carlin');",
"expect(bob.getFullName()).to.eql('George Carlin');"
"expect(bob.getFullName()).to.eql('George Carlin');",
"bob.setFullName('Bob Ross');"
]
},
{

View File

@ -42,4 +42,4 @@ block content
br
ul#testSuite.list-group
br
script(src='/js/lib/bonfire/bonfireFramework_v0.1.0.js')
script(src='/js/lib/bonfire/bonfireFramework_v0.1.1.js')

View File

@ -96,7 +96,7 @@ block content
form.code
.form-group.codeMirrorView
textarea#codeEditor(autofocus=true)
script(src='/js/lib/bonfire/bonfireFramework_v0.1.0.js')
script(src='/js/lib/bonfire/bonfireFramework_v0.1.1.js')