Repository navigation
London | 26-ITP-Sep | Hanna Bohlin | Sprint 2 | Implement and rewrite tests #1707
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
Open
habohlin
wants to merge
55
commits into
CodeYourFuture:main
Choose a base branch
from
habohlin:Sprint-2-Coursework
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
4765894
Passes classify right angle test
habohlin f6f742f
Add test for invalid 0 degree angle and update function to pass
habohlin 048e29d
Add test for acute 1 degree angle and update function to pass
habohlin 36145c0
Add test for acute 89 degree angle, function already passes
habohlin d41cebe
Add test for obtuse 91 degree angle and update function to pass
habohlin 52463f4
Add test for obtuse 179 degree angle, function already passes
habohlin 3ff0de2
Add test for straight 180 degree angle and update function to pass
habohlin 0252cf1
Add test for reflex 181 degree angle and update function to pass
habohlin aab5bd4
Add test for reflex 359 degree angle, function already passes
habohlin ad2c349
Add test for invalid 360 degree angle, function already passes
habohlin d4feec5
Implemented my function is proper fraction
habohlin 79cdd8a
Failed basic proper fraction and fixed the function so it now passes
habohlin 3a8d29e
Add test for improper fraction, it passes
habohlin 6086f76
Add test for edge case improper fraction, it passes
habohlin 4f3db68
Add test for negative proper fraction, it passes
habohlin 5052e1c
Add test for negative improper fraction, it passes
habohlin e59a4ac
Wrote first draft of function, passes valid card test, not non-card s…
habohlin 6656eb2
Changed error message so function passes second test
habohlin 8efb17d
Add test for 19♠, throws error, test passes
habohlin 96fb078
Add test for 'P♦', test passes
habohlin e9444cd
Add test for invalid 's♦', test passes
habohlin de0efff
Add test for invalid 'soUp♦', test passes
habohlin 16db07c
Add test for invalid '-3♦', test passes
habohlin 2f33741
Add test for invalid '5', test passes
habohlin ea29e28
Add test for invalid 'Q', test passes
habohlin 0a1c1b4
Add test for valid 'A♣', test passes
habohlin f0f349f
Add test for valid '10♣', test passes
habohlin ba1b297
Add test for valid 'K♠', test passes
habohlin a451ef8
Change to suitable variable names in tests
habohlin 57095e0
Add jest test for right angle, it passes
habohlin 0c0519e
Add jest tests for obtuse angles, they pass
habohlin 07f9f45
Add jest test for straight angle, it passes
habohlin 42061e2
Add jest tests for Reflex angles, they pass
habohlin 42ae1fa
Add jes tests for invalid angles, they pass
habohlin aa56732
Add jest test for passed 1 and 2 return true, test passes
habohlin bc669ac
Add jest test for passed 4 and 2 returns false, test passes
habohlin 543fbec
Add jest test for passed 2 and 2 returns false, test passes
habohlin add0f70
Add jest test for passes -5 and 8 returns true, test passes
habohlin 17305f8
Add jest test for passes -8 and 5 returns false, test passes
habohlin 666eb6c
Add jest test for passes 0 and 5 returns true, test passes
habohlin 6c1c939
Add jest test for passes 3 and -7 returns true, test passes
habohlin a00da07
Add jest test for valid card '10♣', it passes
habohlin a3974ae
Add jest test for valid card 'K♠', test passes
habohlin 247bf0d
Add jest test for valid card 'A♣', test passes
habohlin 51a2b38
Add jest test for invalid card 'invalid', throws error, test passes
habohlin 856b861
Add jest test for invalid card '19♠', throws error, test passes
habohlin d89b7c3
Add jest test for invalid card 'P♦', throws error, test passes
habohlin bd931e3
Add jest test for invalid card 's♦', throws error, test passes
habohlin 9fc54cf
Add jest test for invalid card 'sOup♦', throws error, test passes
habohlin 1f7930b
Add jest test fir invalid card '-3♦', throws error, test passes
habohlin ead0e96
Add jest test for invalid card '5', throws error, test passes
habohlin fafb4c4
Add jest test for invalid card 'Q', throws error, test passes
habohlin 9737d08
Format all files with prettier
habohlin abe2eb3
Rewrite test messages to describe behaviours instead of exact values
habohlin 9543df3
Refactor to shorter return statement for boolean return value
habohlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the structure of this - having the error being thrown at the bottom of the function is quite clean, as it only requires a single exception throwing statement.
Can you think of any drawbacks to this approach? Or how you might structure the function differently in terms of input validation?
(note: this is not a change request, just a question to prompt some thinking!)