Skip to content

Commit 3fd0647

Browse files
committed
Fix tests with Octokit v18
1 parent f1ead5b commit 3fd0647

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

create-or-update-files.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const plugin = require("./create-or-update-files");
2-
const Octokit = require("@octokit/rest");
2+
const { Octokit } = require("@octokit/rest");
33

44
const nock = require("nock");
55
nock.disableNetConnect();
@@ -250,7 +250,7 @@ test(`success (createBranch, use default base branch, multiple commits)`, async
250250

251251
function mockGetRef(branch, sha, success) {
252252
const m = nock("https://api.github.com").get(
253-
`/repos/${owner}/${repo}/git/ref/heads/${branch}`
253+
`/repos/${owner}/${repo}/git/ref/heads%2F${branch}`
254254
);
255255

256256
const body = {
@@ -447,7 +447,7 @@ function mockUpdateRef(branch) {
447447
};
448448

449449
const m = nock("https://api.github.com").patch(
450-
`/repos/${owner}/${repo}/git/refs/heads/${branch}`,
450+
`/repos/${owner}/${repo}/git/refs/heads%2F${branch}`,
451451
expectedBody
452452
);
453453

0 commit comments

Comments
 (0)