From be4c7150d8d346dc5255d0d777720f354fe6fbeb Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 29 Sep 2024 04:31:50 -0300 Subject: [PATCH] fix: clear `core.summary` mock --- __tests__/utils.test.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 1d9be71..3cadcff 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -1,20 +1,7 @@ -import { isPullRequest, getPath, ActionInputs } from "../src/github/utils.js"; -import * as github from "@actions/github"; +import { getPath, ActionInputs } from "../src/github/utils.js"; import Path from "node:path"; -import { describe, expect, it, vi } from "vitest"; +import { describe, expect, it } from "vitest"; -vi.mock("@actions/github"); -describe("isPullRequest", () => { - it("should return true if the context is a pull request", () => { - github.context.payload = { pull_request: {number: 1} }; - expect(isPullRequest()).toBe(true); - }); - - it("should return false if the context is not a pull request", () => { - github.context.payload = {}; - expect(isPullRequest()).toBe(false); - }); -}); describe("getPath", () => { it("should return the resolved path based on the input srcDir", () => {