Skip to content

Commit

Permalink
test: fixing context values
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jan 6, 2025
1 parent 7da66aa commit 35ec79c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/fees.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jest.unstable_mockModule("../src/helpers/web3", () => ({
}));

jest.unstable_mockModule("@actions/github", () => ({
default: {},
context: {
runId: "1",
payload: {
Expand Down
15 changes: 10 additions & 5 deletions tests/pre-check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ import { customOctokit as Octokit } from "@ubiquity-os/plugin-sdk/octokit";

const issueUrl = "https://github.com/ubiquity/work.ubq.fi/issues/69";

jest.unstable_mockModule("@actions/github", () => ({
default: {},
context: {
jest.unstable_mockModule("@actions/github", () => {
const context = {
runId: "1",
payload: {
repository: {
html_url: "https://github.com/ubiquity-os/conversation-rewards",
},
},
},
}));
};
return {
default: {
context,
},
context,
};
});

beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
Expand Down

0 comments on commit 35ec79c

Please sign in to comment.