Skip to content

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 <[email protected]>
- Ensure the quality of an item is never negative.
- Ensure the quality of Aged Brie or Backstage Passes never exceeds 50.
- Verify that the quality increases for Aged Brie and Backstage Passes
as the SellIn approaches.
- Verify that the quality for Backstage Passes drops to 0 after the
concert.
- Ensure the quality of Sulfuras is 80 and never alters.
- Ensure SellIn value for Sulfuras never alters.
- Ensure SellIn value decreases by 1 for all items except Sulfuras.
- Add two more test cases to validate that the quality of Backstage
Passes increases.
- Ensure the quality is not above 50 using a single test.
- Add test to verify quality degrading twice as fast once the SellIn
date has passed.
- Add tests for Conjured items.
- Verify SellIn and quality values in Backstage Passes test.

Signed-off-by: Alexandra Stroiu <[email protected]>
Format code in the gilded-rose.spec.ts file.

Signed-off-by: Alexandra Stroiu <[email protected]>
Change the test for the Suflura item in the gilded-rose.spec.ts file:
fix the name of the item. Modify the updateQuality method in the
gilded-rose.ts file. Also change the test for Conjured items in the
gilded-rose.spec.ts file.

Signed-off-by: Alexandra Stroiu <[email protected]>
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