mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-18 03:45:04 +00:00
test: set up Deno version test cases
This commit is contained in:
1 parent
f86e41151c
commit
3690af35f9
4 files changed
+55
-18
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { describe, it } from "jsr:@std/testing/bdd";
|
||||
import { expect } from "jsr:@std/expect";
|
||||
|
||||
import { GildedRose, Item } from "../app/gilded-rose.ts";
|
||||
|
||||
describe("Gilded Rose specifications", () => {
|
||||
it("should foo", () => {
|
||||
const gildedRose = new GildedRose([new Item("foo", 0, 0)]);
|
||||
const items = gildedRose.updateQuality();
|
||||
expect(items[0].name).toBe("fixme");
|
||||
});
|
||||
});
|
||||
@@ -18,8 +18,8 @@ const items = [
|
||||
const gildedRose = new GildedRose(items);
|
||||
|
||||
let days: number = 2;
|
||||
if (process.argv.length > 2) {
|
||||
days = +process.argv[2];
|
||||
if (Deno.args.length > 0) {
|
||||
days = +Deno.args[0];
|
||||
}
|
||||
|
||||
for (let i = 0; i < days + 1; i++) {
|
||||
|
||||
Reference in new issue
Block a user