Commit Graph

14 Commits

Author SHA1 Message Date
Chamoda Ranasinghe
6109899ada
added CONJURED_CAKE key to ItemNames constant 2024-01-16 03:53:34 +07:00
Chamoda Ranasinghe
dc0af40495
cleared updateNormalItem method and asserted 2024-01-16 03:52:03 +07:00
Chamoda Ranasinghe
ddae445fec
cleared the updateSulfurasItem without affecting the test results 2024-01-16 03:45:48 +07:00
Chamoda Ranasinghe
ccf3cc6166
cleaned up updateSulfurasItem
asserted item name ItemNames.SULFURAS
2024-01-16 03:38:09 +07:00
Chamoda Ranasinghe
7577596171
cleaned up updateBackstagePassesItem method
asserted ItemNames.BACKSTAGE_PASSES
2024-01-16 03:33:11 +07:00
Chamoda Ranasinghe
98b400604e
cleaned up updateAgedBrieItem method
assert AGED_BREE key
2024-01-16 03:20:58 +07:00
Chamoda Ranasinghe
5c9f3822a2
added 4 individual private methods to update each item based on name
replicated main business logic to all 4 functions (can individually clean each function afterwards)
added a switch statement in the main loop to call private methods
2024-01-16 03:15:20 +07:00
Chamoda Ranasinghe
4dd7622f7a
Code fixes
fixed else if refractor in 2 places
fixed item.quality - item.quality to item.quality = 0
2024-01-16 02:36:57 +07:00
Chamoda Ranasinghe
f6a3a6d718
added MAX_ITEM_QUALITY in constants file and referred it 2024-01-16 02:30:10 +07:00
Chamoda Ranasinghe
e44c0a1d18
created const file and added ItemNames constant obj to maintain a key against each item name 2024-01-16 02:25:45 +07:00
Chamoda Ranasinghe
aeae3bbdc3
replaced main for loop in updateQuality method with for.. of 2024-01-16 02:10:34 +07:00
Anthony Rey
b0f4a15245 Add Jest to TypeScript (and update dependencies) 2021-11-09 18:41:26 +01:00
Tomas Novella
939afa9822
Fix compile error in TS
Without a type annotation, TS expects the argument in the ctor to be a never[], hence "npm test" fails to even start
2018-12-09 09:40:49 +01:00
Paulo Clavijo Esteban
10346b66c8 Added GildedRose for TypeScript 2017-06-30 17:32:04 +01:00