Skip to content

Commit

Permalink
address test regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
dpickett committed Feb 5, 2024
1 parent b2baa43 commit 52b9c01
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/import-adapters/shortcut/__tests__/StorySetImport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import StorySet from "../../../markdown/StorySet";

import StorySetImport from "../StorySetImport";
import Client from "../Client";
import Epic from "../../../markdown/Epic";
jest.mock("../Client");

describe("story set import", () => {
const epicName = "Epic One";
const storyA = new Story({ name: "first story", epicName });
const storyB = new Story({ name: "second story", epicName });
const epic = new Epic({ name: epicName });
const storyA = new Story({ name: "first story", epic });
const storyB = new Story({ name: "second story", epic });
let storySet: StorySet;
let mockClient: Client;

Expand Down
6 changes: 4 additions & 2 deletions src/markdown/__tests__/Story.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Story from "../Story";
import Epic from "../Epic";

describe("Markdown Story", () => {
let story: Story;
Expand All @@ -9,7 +10,7 @@ describe("Markdown Story", () => {
story = new Story({
name: storyName,
description: storyDescription,
epicName: storyEpicName,
epic: new Epic({name: storyEpicName}),
});
});

Expand All @@ -21,6 +22,7 @@ describe("Markdown Story", () => {
});

it("has an epicName", () => {
expect(story.epicName).toEqual(storyEpicName);
expect(story.epic).toBeDefined();
expect(story.epic?.name).toEqual(storyEpicName);
});
});
6 changes: 4 additions & 2 deletions src/markdown/__tests__/normalizeStorySet.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Story from "../Story";
import normalizeStorySet from "../normalizeStorySet";
import Epic from "../Epic";

describe("normalize story set", () => {
const epicName = "Epic One";
const storyA = new Story({ name: "first story", epicName });
const storyB = new Story({ name: "second story", epicName });
const epic = new Epic({ name: epicName });
const storyA = new Story({ name: "first story", epic });
const storyB = new Story({ name: "second story", epic });

beforeEach(() => {});
it("populates the epic reference", () => {
Expand Down

0 comments on commit 52b9c01

Please sign in to comment.