Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ vi.mock("@actions/github", () => ({
graphql: mockedGraphql,
}),
}));
vi.mock("@actions/core", { spy: true });
const mockedWarning = vi.mocked(core.warning);
vi.mock("@actions/core", async (importOriginal) => ({
...(await importOriginal<typeof import("@actions/core")>()),
error: vi.fn(),
notice: vi.fn(),
warning: vi.fn(),
}));
vi.mock("@changesets/ghcommit");

let mockedGithubMethods = {
Expand Down Expand Up @@ -133,7 +137,7 @@ describe("publish", () => {
});

expect(result).toEqual({ published: false, exitCode: 0 });
expect(mockedWarning).toHaveBeenCalledWith(
expect(core.warning).toHaveBeenCalledWith(
expect.stringContaining(
"GitHub releases and git tags cannot be created without this output",
),
Expand Down