@@ -8,15 +8,15 @@ import { paginateRest } from "../src/index.ts";
8
8
describe ( "https://github.com/octokit/plugin-paginate-rest.js/issues/46" , ( ) => {
9
9
it ( "octokit.paginate('GET /projects/columns/{column}/cards', { column })" , async ( ) => {
10
10
const mock = fetchMock
11
- . sandbox ( )
11
+ . createInstance ( )
12
12
. get ( "https://api.github.com/projects/columns/123/cards" , {
13
13
body : [ { id : 123 } ] ,
14
14
} ) ;
15
15
16
16
const TestOctokit = Octokit . plugin ( paginateRest ) ;
17
17
const octokit = new TestOctokit ( {
18
18
request : {
19
- fetch : mock ,
19
+ fetch : mock . fetchHandler ,
20
20
} ,
21
21
} ) ;
22
22
@@ -32,15 +32,15 @@ describe("https://github.com/octokit/plugin-paginate-rest.js/issues/46", () => {
32
32
33
33
it ( "octokit.paginate(octokit.projects.listCards, { column })" , async ( ) => {
34
34
const mock = fetchMock
35
- . sandbox ( )
35
+ . createInstance ( )
36
36
. get ( "https://api.github.com/projects/columns/123/cards" , {
37
37
body : [ { id : 123 } ] ,
38
38
} ) ;
39
39
40
40
const TestOctokit = Octokit . plugin ( paginateRest , restEndpointMethods ) ;
41
41
const octokit = new TestOctokit ( {
42
42
request : {
43
- fetch : mock ,
43
+ fetch : mock . fetchHandler ,
44
44
} ,
45
45
} ) ;
46
46
@@ -55,15 +55,15 @@ describe("https://github.com/octokit/plugin-paginate-rest.js/issues/46", () => {
55
55
describe ( "https://github.com/octokit/plugin-paginate-rest.js/issues/158" , ( ) => {
56
56
test ( "handle 204 response for `GET /repos/{owner}/{repo}/contributors` if repository is empty" , async ( ) => {
57
57
const mock = fetchMock
58
- . sandbox ( )
58
+ . createInstance ( )
59
59
. get ( "https://api.github.com/repos/owner/empty-repo/contributors" , {
60
60
status : 204 ,
61
61
} ) ;
62
62
63
63
const TestOctokit = Octokit . plugin ( paginateRest ) ;
64
64
const octokit = new TestOctokit ( {
65
65
request : {
66
- fetch : mock ,
66
+ fetch : mock . fetchHandler ,
67
67
} ,
68
68
} ) ;
69
69
@@ -80,7 +80,7 @@ describe("https://github.com/octokit/plugin-paginate-rest.js/issues/158", () =>
80
80
81
81
test ( "handle 409 response for `GET /repos/{owner}/{repo}/commits` if repository is empty" , async ( ) => {
82
82
const mock = fetchMock
83
- . sandbox ( )
83
+ . createInstance ( )
84
84
. get ( "https://api.github.com/repos/owner/empty-repo/commits" , {
85
85
status : 409 ,
86
86
body : {
@@ -93,7 +93,7 @@ describe("https://github.com/octokit/plugin-paginate-rest.js/issues/158", () =>
93
93
const TestOctokit = Octokit . plugin ( paginateRest ) ;
94
94
const octokit = new TestOctokit ( {
95
95
request : {
96
- fetch : mock ,
96
+ fetch : mock . fetchHandler ,
97
97
} ,
98
98
} ) ;
99
99
0 commit comments