Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Apr 16, 2020
1 parent 51445ed commit cc07bdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/__tests__/auto-in-pr-ci.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ describe("next in ci", () => {
test("should post comment with new version", async () => {
const auto = new Auto({ ...defaults, plugins: [] });

// @ts-ignore
jest.spyOn(console, 'log').mockImplementation();
exec.mockResolvedValue("v1.0.0");
// @ts-ignore
auto.checkClean = () => Promise.resolve(true);
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/__tests__/auto.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ describe("Auto", () => {
await auto.loadConfig();
auto.git!.getLatestRelease = () => Promise.resolve("1.2.3");

jest.spyOn(auto.git!, "publish").mockReturnValueOnce({} as any);
jest.spyOn(auto.git!, "publish").mockReturnValueOnce({ data: {} } as any);
jest
.spyOn(auto.release!, "generateReleaseNotes")
.mockImplementation(() => Promise.resolve("releaseNotes"));
Expand Down Expand Up @@ -910,7 +910,7 @@ describe("Auto", () => {
auto.git!.getPreviousTagInBranch = () => Promise.resolve("1.2.3");
auto.git!.getLatestTagInBranch = () => Promise.resolve("1.2.4");

jest.spyOn(auto.git!, "publish").mockReturnValueOnce({} as any);
jest.spyOn(auto.git!, "publish").mockReturnValueOnce({ data: {} } as any);
jest
.spyOn(auto.release!, "generateReleaseNotes")
.mockImplementation(() => Promise.resolve("releaseNotes"));
Expand Down Expand Up @@ -947,7 +947,7 @@ describe("Auto", () => {
await auto.loadConfig();
auto.git!.getLatestRelease = () => Promise.resolve("1.2.3");

jest.spyOn(auto.git!, "publish").mockReturnValueOnce({} as any);
jest.spyOn(auto.git!, "publish").mockReturnValueOnce({ data: {} } as any);
jest
.spyOn(auto.release!, "generateReleaseNotes")
.mockImplementation(() => Promise.resolve("releaseNotes"));
Expand Down Expand Up @@ -986,7 +986,7 @@ describe("Auto", () => {
await auto.loadConfig();
auto.git!.getLatestRelease = () => Promise.resolve("1.2.3");

jest.spyOn(auto.git!, "publish").mockReturnValueOnce({} as any);
jest.spyOn(auto.git!, "publish").mockReturnValueOnce({ data: {} } as any);
jest
.spyOn(auto.release!, "generateReleaseNotes")
.mockImplementation(() => Promise.resolve("releaseNotes"));
Expand Down

0 comments on commit cc07bdd

Please sign in to comment.