Skip to content

Commit ca3c24d

Browse files
committed
Ensure the abort signal is properly passing through to the request
1 parent 9b8ec30 commit ca3c24d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

packages/apps/shopify-api/adapters/mock/adapter.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@ import {
1616
} from '../../runtime/http';
1717

1818
import {mockTestRequests} from './mock_test_requests';
19-
20-
// Store request init objects for testing purposes
21-
export const mockRequestCapture = {
22-
lastRequestInit: undefined as RequestInit | undefined,
23-
reset() {
24-
this.lastRequestInit = undefined;
25-
},
26-
};
19+
import {mockRequestCapture} from './mock_request_capture';
2720

2821
interface MockAdapterArgs extends AdapterArgs {
2922
rawRequest: NormalizedRequest;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {RequestInit} from 'node-fetch';
2+
3+
// Store request init objects for testing purposes
4+
export const mockRequestCapture = {
5+
lastRequestInit: undefined as RequestInit | undefined,
6+
reset() {
7+
this.lastRequestInit = undefined;
8+
},
9+
};

packages/apps/shopify-api/adapters/mock/mock_test_requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {NormalizedRequest, NormalizedResponse} from '../../runtime/http';
22

3-
import {mockRequestCapture} from './adapter';
3+
import {mockRequestCapture} from './mock_request_capture';
44

55
type RequestListEntry = NormalizedRequest;
66
type ResponseListEntry = NormalizedResponse | Error;

0 commit comments

Comments
 (0)