We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da7c253 commit 19df682Copy full SHA for 19df682
test/plugin.test.ts
@@ -62,4 +62,23 @@ describe("Octokit.plugin()", () => {
62
const MyOctokit = Octokit.plugin(myPlugin).plugin(myPlugin);
63
expect(() => new MyOctokit()).not.toThrow();
64
});
65
+
66
+ it("supports chaining", () => {
67
+ const MyOctokit = Octokit.plugin(() => {
68
+ return {
69
+ foo: "bar"
70
+ };
71
+ })
72
+ .plugin(() => {
73
+ return { baz: "daz" };
74
75
76
+ return { qaz: "naz" };
77
+ });
78
79
+ const myClient = new MyOctokit();
80
+ expect(myClient.foo).toEqual("bar");
81
+ expect(myClient.baz).toEqual("daz");
82
+ expect(myClient.qaz).toEqual("naz");
83
84
0 commit comments