This repository was archived by the owner on Oct 26, 2020. It is now read-only.
Repository navigation
Improvements to JS1 week1 homework - #13
Merged
Merged
Conversation
* Tests show what was expected and what was actually returned. This both helps the students to understand what was wrong, and is more like what they'll encounter in real life from test suites. * Fix up partial rename from getRemainder to getTotal. * Fix up real-world logic of currency conversion (a % fee should _cost_ you more, not _give_ you more!) * Magic 8 ball doesn't use a global variable, and explains slightly more what checkAnswer should actually do. * Magic 8 ball tests to make sure more than one value is actually returned. Note that this introduces use of `require` to import `util` - this is a built-in module in Node, so doesn't add any extra requirements to how the tests are run, but does introduce an element of syntax we haven't taught the students. This is only in the test machinery itself, and is fairly cosmetic, so hopefully won't confuse folks.
ChrisOwen101
approved these changes
Jun 19, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
helps the students to understand what was wrong, and is more like what
they'll encounter in real life from test suites.
you more, not give you more!)
what checkAnswer should actually do.
returned.
Note that this introduces use of
requireto importutil- this is abuilt-in module in Node, so doesn't add any extra requirements to how
the tests are run, but does introduce an element of syntax we haven't
taught the students. This is only in the test machinery itself, and is
fairly cosmetic, so hopefully won't confuse folks.