Skip to content

Refactor updateQuality method and add more tests #50

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
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

alexandrastroiu
Copy link

Refactor updateQuality method in the gilded-rose.ts file and add more tests in the gilded-rose.spec.ts file.

Fix the two tests for the updateQuality function in the gilded-rose.spec.ts file.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
-Add a new test that checks if the quality of an item is never negative.
-Add tests that check if the quality for Aged Brie or Backstage Passes can be above 50.
-Add tests that check if the quality increases for Aged Brie and Backstage Pass items as the SellIn value approaches.
-Add test that checks if the quality for the Backstage Passes drops to 0 after the concert
-Add test that checks if the quality of Sulfuras is 80 and never alters
-Add test that checks if the SellIn date for Sulfuras never alters
-Add test that checks if the SellIn value decreases by 1 for all items except Sulfuras
-Correct test that checks if the SellIn date decreases for items except Sulfuras
-Add 2 more items to the tests that check if the quality Of Backstage Passes increases
-Check if the quality is not above 50 using only one test
-Add test that checks if the quality degrades twice as fast once the SellIn date has passed
-Add tests for conjured items
-Check SellIn and Quality in the test for Backstage Passes

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Format code in the gilded-rose.spec.ts file.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Modified updateQuality method in the gilded-rose.ts file.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Change test for the Suflura item in the gilded-rose.spec.ts file: fix the name of the item.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Modify updateQuality method in the gilded-rose.ts file

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Change test for Conjured items in the gilded-rose.spec.ts file.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Modify the updateQuality method in the gilded-rose.ts file.

Signed-off-by: Alexandra Stroiu <alexandra.stroiu@stud.acs.upb.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant