Skip to content

Commit

Permalink
mention why mocking github server
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed May 2, 2024
1 parent 1d34e80 commit 63d46e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mock/github-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { type RouteGenericInterface } from "fastify/types/route";
// this is a mock server to simulate the GitHub API,
// it's not a complete implementation, only the parts used in the app

// Why not just mock the Octokit fetch method?
// Because we use Node.js and next.js edge runtime, mocked state won't persist between runtime,
// and edge runtime doesn't have access to the file system to store the state.

type Issue =
Endpoints["GET /repos/{owner}/{repo}/issues"]["response"]["data"][0];

Expand Down

0 comments on commit 63d46e6

Please sign in to comment.