Skip to content

Commit 6b91e52

Browse files
committed
test: .defaults() method on rest endpoint methods
1 parent 25bf33f commit 6b91e52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/typescript.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,13 @@ describe("Smoke test", () => {
5050
"https://api.github.com/repos/foo/bar/contents/path%2Fto%2Fbinary%2Ffile"
5151
);
5252
});
53+
54+
it(".defaults()", async () => {
55+
const MyOctokit = Octokit.plugin(restEndpointMethods);
56+
const octokit = new MyOctokit();
57+
58+
const myRequest = octokit.repos.getContents.defaults({ method: "HEAD" });
59+
60+
expect(myRequest.endpoint.DEFAULTS.method).toEqual("HEAD");
61+
});
5362
});

0 commit comments

Comments
 (0)