mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
add golden master for typescript
This commit is contained in:
parent
a422b614c8
commit
8a4aa4b684
27
TypeScript/test/golden-master-text-test.ts
Normal file
27
TypeScript/test/golden-master-text-test.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { Item, GildedRose } from '../app/gilded-rose';
|
||||||
|
|
||||||
|
const items = [
|
||||||
|
new Item("+5 Dexterity Vest", 10, 20), //
|
||||||
|
new Item("Aged Brie", 2, 0), //
|
||||||
|
new Item("Elixir of the Mongoose", 5, 7), //
|
||||||
|
new Item("Sulfuras, Hand of Ragnaros", 0, 80), //
|
||||||
|
new Item("Sulfuras, Hand of Ragnaros", -1, 80),
|
||||||
|
new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20),
|
||||||
|
new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49),
|
||||||
|
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
|
||||||
|
// this conjured item does not work properly yet
|
||||||
|
new Item("Conjured Mana Cake", 3, 6)];
|
||||||
|
|
||||||
|
|
||||||
|
const gildedRose = new GildedRose(items);
|
||||||
|
var days: number = 2;
|
||||||
|
for (let i = 0; i < days; i++) {
|
||||||
|
console.log("-------- day " + i + " --------");
|
||||||
|
console.log("name, sellIn, quality");
|
||||||
|
items.forEach(element => {
|
||||||
|
console.log(element.name + ' ' + element.sellIn + ' ' + element.quality);
|
||||||
|
|
||||||
|
});
|
||||||
|
console.log();
|
||||||
|
gildedRose.updateQuality();
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user