New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more verbose bonfire challenge descriptions #111
Comments
Good point on the invisible variables. @terakilobyte, could we print out variables declared in the tests? I didn't realize they wouldn't be visible. Otherwise, yes, we can make the assertions obvious. There is no need for them to be in variables. |
Looking at the json for this challenge revealed this.
If you mean print out the variables created as part of the test, no, there's no meaningful way to print those out separately. This bonfire needs to be rewritten to show the test case as part of the test, rather than whisking them away in a variable. I'll close this issue once I've done so. |
The challenge has been updated to be more descriptive, and the tests have been rewritten to use expect instead of assert. A style guide would be greatly useful (wink wink to one of you) specifying that all bonfires should have additional information and no tests should use assert as they become quite long with the output text where as it's built into expect/should. |
At times, the bonfire challenge descriptions do not always give a clear expectation of what the test cases are looking for. The test cases are sometimes visible when the programmer tries to run a program, but not always clearly written out from a user standpoint.
Example: "Where do I belong?"
"Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument)."
The test cases that are visible after submitting code are:
"assert.equal(indexForNum, 3, '35 should be inserted at index 3');"
assert.equal(indexFor30, 2, '30 should be inserted at index 2');
While the test cases obviously work from a functionality standpoint, what is visible to the user is not always clear. What are indexforNum and then indexfor30?
The description of the problem, visible upon load, could simply add,
"[[2,4,6,8], 7] should return 3"
If the lack of verbose instructions is part of the challenge, then it doesn't need changed; on the other hand, being a bit more explicit about the spec of a particular problem seems more "real-life" and could be helpful.
I am willing to add this feature myself, but only if it doesn't conflict with the intent and purpose of the bonfire challenges. :)
The text was updated successfully, but these errors were encountered: