diff --git a/TypeScript/test/guilded-rose.spec.ts b/TypeScript/test/gilded-rose.spec.ts similarity index 100% rename from TypeScript/test/guilded-rose.spec.ts rename to TypeScript/test/gilded-rose.spec.ts diff --git a/TypeScript/test/golden-master-text-test.ts b/TypeScript/test/golden-master-text-test.ts new file mode 100644 index 00000000..96b60e41 --- /dev/null +++ b/TypeScript/test/golden-master-text-test.ts @@ -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(); +} \ No newline at end of file diff --git a/TypeScript/test/mocha.opts b/TypeScript/test/mocha.opts index bf3868c8..7f3499f7 100644 --- a/TypeScript/test/mocha.opts +++ b/TypeScript/test/mocha.opts @@ -1,4 +1,4 @@ --compilers ts-node/register --require source-map-support/register --recursive -test/**/*.ts +test/**/*.spec.ts