Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Apr 26, 2023
1 parent 5cd0f8f commit b9aa3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/core/src/__tests__/auto-make-changelog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jest.mock("@octokit/rest", () => {

repos = {
get: jest.fn().mockReturnValue(Promise.resolve({})),
getLatestRelease: jest.fn().mockReturnValue({ data: { tag_name: "" } }),
};

hook = {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/auto.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jest.mock("@octokit/rest", () => {

repos = {
get: jest.fn().mockReturnValue({}),
getLatestRelease: jest.fn().mockReturnValue({ data: { tag_name: "" } }),
};

hook = {
Expand Down Expand Up @@ -976,7 +977,6 @@ describe("Auto", () => {
);
});


test("should use --to commit target", async () => {
const auto = new Auto({ ...defaults, plugins: [] });
auto.logger = dummyLog();
Expand All @@ -995,7 +995,7 @@ describe("Auto", () => {
auto.hooks.afterRelease.tap("test", afterRelease);
jest.spyOn(auto.release!, "getCommits").mockImplementation();

await auto.runRelease({ to: 'abc'});
await auto.runRelease({ to: "abc" });

expect(auto.git!.publish).toHaveBeenCalledWith(
"releaseNotes",
Expand Down

0 comments on commit b9aa3db

Please sign in to comment.