Skip to content

Commit 979d5f1

Browse files
committed
Add smoke tests that plugin can be loaded
1 parent d0884d3 commit 979d5f1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

create-or-update-files.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@ test("failure (fileToDelete is missing)", async () => {
388388
);
389389
});
390390

391+
test("Loads plugin", () => {
392+
const TestOctokit = Octokit.plugin(require("."));
393+
const testOctokit = new TestOctokit();
394+
expect(testOctokit).toHaveProperty("rest.repos.createOrUpdateFiles");
395+
});
396+
397+
test("Does not overwrite other methods", () => {
398+
const TestOctokit = Octokit.plugin(require("."));
399+
const testOctokit = new TestOctokit();
400+
expect(testOctokit).toHaveProperty("rest.repos.acceptInvitation");
401+
});
402+
391403
function mockGetRef(branch, sha, success) {
392404
const m = nock("https://api.github.com").get(
393405
`/repos/${owner}/${repo}/git/ref/heads%2F${branch}`

0 commit comments

Comments
 (0)