eaf60318d6e1b7243de3eddac167bc81ef5413ca diff --git a/src/games.test.ts b/src/games.test.ts index 91015248b8519a6bfd09ea5f341ca8b365eae46b..88cf6168a2e9435d9461323f0c165164d5306bec 100644 --- a/src/games.test.ts +++ b/src/games.test.ts @@ -5,3 +5,16 @@ test("loadGame returns a game with the expected id", async () => { const game = await loadGame("string-calc"); expect(game.id).toBe("string-calc"); }); + +test("loadGame returns the kata's step ids in order", async () => { + const game = await loadGame("string-calc"); + expect(game.steps.map((s) => s.id)).toEqual([ + "empty", + "single-number", + "two-numbers", + "n-numbers", + "newline-separator", + "custom-separator", + "negatives-throw", + ]); +}); diff --git a/src/games.ts b/src/games.ts index e0a61811985aae37b47ce87057189229e1fb055f..f02c57f410e2bc06eff4ac45aa9b2bc8ca3ec452 100644 --- a/src/games.ts +++ b/src/games.ts @@ -1,7 +1,12 @@ +export interface Step { + id: string; +} + export interface Game { id: string; + steps: Step[]; } export async function loadGame(id: string): Promise { - return { id }; + return { id, steps: [] }; }