6 kyu
Magic Highschool: Your first potion
62adri326
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
There's no
amount
parameter in the initial solution, and it seems no argument is ever provided for it in the tests.Tests are not working properly, throw an error : ReferenceError: Test is not defined at /workspace/node/test.js:59:1 ...
It's "recipe", plural "recipes".
Thanks ^^
In the sample tests too.
What???
I wanted to make an anti-cheating thing, which would override the
require
method and trigger an error if someone tried to require thefs
module, since I didn't want users to see the answer in the test closureIt bans other libraries too. At least it should have been mentioned in the desciption. Also, when I first tried
require('lodash')
, there was aRangeError
thrown, only with other libraries I got that expection. I'm not sure how hard it is to get a value from a closure in Node.js, but it's not too hard in certain other languages and I still haven't seen it done yet here, so I'm not sure whether that's worth it. Anyway, as I can see,require
works now.