Fix for bonfire to allow people to prototype objects properly but lose default insertion point injection (i.e. they will get an error if they forget to call their function

pull/94/head
Nathan Leniz 2015-02-13 12:14:12 -05:00
parent a9036408aa
commit a0427b3e18
4 changed files with 7 additions and 7 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

@ -506,10 +506,9 @@
"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."
],
"challengeEntryPoint": "var bob = new Person('Bob Ross');",
"challengeEntryPoint": "var bob = new Person('Bob Ross');\nbob.getFullName();",
"challengeSeed": "var Person = function(firstAndLast) {\n return firstAndLast;\r\n};",
"tests": [
"expect(Object.keys(bob).length).to.eql(6);",
@ -524,7 +523,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')