Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Nov 14, 2023
1 parent 88a4139 commit 4eca1cd
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions __tests__/setup.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import core from "@actions/core";
import github from "@actions/github";
import nock from "nock";
import type { Octokit } from "@octokit/core";
import type { Api } from "@octokit/plugin-rest-endpoint-methods/dist-types/types";
import type { PaginateInterface } from "@octokit/plugin-paginate-rest";
import type { Api } from "@octokit/plugin-rest-endpoint-methods/dist-types/types";
import nock from "nock";
import nodeFetch from "node-fetch";

nock.disableNetConnect();

type GitHub = Api & Octokit & { paginate: PaginateInterface };

jest.mock("../src/octokit", () => {
return {
octokit(): GitHub {
return github.getOctokit(core.getInput("repo-token"), {
request: {
fetch: nodeFetch,
},
});
},
};
});
jest.mock("../src/octokit", () => ({
octokit: (): GitHub =>
github.getOctokit(core.getInput("repo-token"), {
request: {
fetch: nodeFetch,
},
}),
}));

0 comments on commit 4eca1cd

Please sign in to comment.