Skip to content

Barcelona | Oct2025-2 | Roman Pavlenko | Sprint-3 | Coursework#3

Open
DraftRoman wants to merge 29 commits intomainfrom
exercises-of-sprint-3
Open

Barcelona | Oct2025-2 | Roman Pavlenko | Sprint-3 | Coursework#3
DraftRoman wants to merge 29 commits intomainfrom
exercises-of-sprint-3

Conversation

@DraftRoman
Copy link
Copy Markdown
Owner

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

In the file
- added if statements
- export function for test environment
- created type.test.js file with the first case for setting engagement
- created a package.json with name/description / scripts for Jest  and install Jest "devDependencies": {"jest": "^30.2.0" },
- pachage-lock.json was automatically generated
- we got "Assertion failed: Expected undefined to equal Full rotation" as expected because we don't have statement for this case.
- for 180 and 270 everything looking good.
- next step fix 360 and try Jest tests
- implemented test cases and fix Full rotation issue
- checked in terminal npm test
- the  first one is the function for moving Zeros to the end of the array.
- the second one is about write a function that takes in a string of one or more words, and returns the same string, but with all words that have five or more letters reversed.
- the third one is Create a function taking a positive integer between 1 and 3999 (both included) as its parameter and returning a string containing the Roman Numeral representation of that integer.
And in these files are more then just one solution, just tried few solutions of others.
- Fixed statement, and now it's already passed basic cases.
- Added test.js with these tests, and it passed.
- The nest step add more edge cases, like 0 and what to do.
- Create new function to check if it's a half, two-quarters, three-sixths, less or more then.
Stretch tests :
- 0, 5 passed the test
- 3, -4 passed the test
- -2, -3 failed the test, because -3 is less then -2. To fix it I'm going to add one more if statement.
@DraftRoman
Copy link
Copy Markdown
Owner Author

Screenshot 2025-12-16 121322

- added if statement for 2 negative numbers.
- checked results of the tests.
In this case, this is not a problem, but could these changes lead to possible mutations?
@DraftRoman
Copy link
Copy Markdown
Owner Author

Passed the tests

Screenshot 2025-12-16 122441

- added module.exports = { getCardValue };
- fixed logic of If statement
- created test.js file and added first test
- first test passed
- expanded the logic of If statement to cover Face Cards
- wrote tests for every cand which have a value of 10
- the tests for them covered, the test for 5 was expectedly failed
- for second added denominator equal to zero.
- covered by test it
- for third test created expect used to Throw method, but have a syntactic error
- fixed if statement form cards <2 and more then 9
- fixed else and throw  by google it
- now it's working for negative angles or more then 360 .
- created more tests for edge cases
- covered by seven new tests.
- if logic from previous tast
@DraftRoman
Copy link
Copy Markdown
Owner Author

The card value passed the tests

Screenshot 2025-12-16 164437

@DraftRoman
Copy link
Copy Markdown
Owner Author

2-mandatory-rewrite- tests

Screenshot 2025-12-16 220745

- not exist in string
- case-sensetive
- single occurrence
And covered it by tests of empty string and invalid argument
@DraftRoman
Copy link
Copy Markdown
Owner Author

Added Input validation and covered by tests.

Screenshot 2025-12-16 224121

- all regular cases including any ordinal numbers
- cases 13 - 15 are for invalid input such as negative numbers, strings or null / undefined
I'd like to have tests for 11/12/13/14 and 21/22/23/24and for some larger numbers to check scalability
- configured the process logic
- everything covered by tests
- fixed for not integer input, and changed in tests case 10, because 1.5 isn't ordinal number.
- moved input validation from the loop and made it the first thing to do when function starts.
- strict equal sign
- and less lines of code, first three cases together with the rest of code, and default.
-if it's 0 or 1 and error case.
Logic for function:
- first validate input
- second for loop  to implement the repeat function.
- retured the line module.exports = repeat which was deleted.
@DraftRoman
Copy link
Copy Markdown
Owner Author

Everything in 3-mandatory-practice was done and covered by tests

Screenshot 2025-12-18 145741

Worked with questions:
 - a) How the index variable updates during the call to find?
- b) What is the if statement used to check
- c) Why is index++ being used?
- d) What is the condition index < str.length used for?
- Have at least 5 characters.
- Have at least one English uppercase letter (A-Z)
- Have at least one English lowercase letter (a-z)
@DraftRoman DraftRoman moved this to 🏗 In progress in Template Coursework Planner Board Dec 20, 2025
- changed the logic of if statement, not to create extra error messages in the function.
- covered by the test
- now password has to consist >5 letter at least one lowercase, uppercase, number
- created one edge case if the password has at least one space.
- added validation to non-alphanumeric symbols
- checked the password is unique and haven't used before
- the new password will be pushed to the priviesPasswords array and we have a mutation.
Maybe better to have here a pure validation and create another function for pushing the password to array based on the value of this function
Were added basic tests:
- The password is the same as a previous one
- the password passed all requirements and we have the message that the password is strong
@DraftRoman
Copy link
Copy Markdown
Owner Author

Finished working on password validation and covered it with tests

Screenshot 2025-12-21 210306

@DraftRoman DraftRoman moved this from 🏗 In progress to 👀 In review in Template Coursework Planner Board Dec 21, 2025
@DraftRoman DraftRoman moved this from 👀 In review to ✅ Done in Template Coursework Planner Board Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant