Skip to content

Commit c291300

Browse files
committed
chore: fix tests (only really here for type checks atm)
1 parent 4c50e7d commit c291300

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ReferenceServiceClient } from './reference.js';
55

66
export const client = new ReferenceServiceClient({
77
requestMethod() {
8-
return Promise.resolve();
8+
return Promise.resolve(true);
99
},
1010
});
1111

__tests__/reference.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable no-underscore-dangle */
22
/// <reference lib="dom" />
33

4-
import { findPets } from './fixtures/petstore/methods.js';
54
import type {
65
RequestMethod,
76
RequestMethodCaller,
@@ -22,25 +21,3 @@ export class ReferenceServiceClient {
2221
return fn(this.#requestMethod, options);
2322
}
2423
}
25-
26-
const client = new ReferenceServiceClient({
27-
requestMethod: (params, { signal } = {}) => {
28-
const { pathname, method, query, body, headers = {} } = params;
29-
30-
const url = new URL(pathname, 'https://api.example.com');
31-
url.search = query
32-
? new URLSearchParams(
33-
Object.entries(query).map(([k, v]) => [k, v.toString()]),
34-
).toString()
35-
: '';
36-
37-
return fetch(url, {
38-
method,
39-
body: JSON.stringify(body) || null,
40-
headers,
41-
signal: signal || null,
42-
});
43-
},
44-
});
45-
46-
await client.send(findPets());

0 commit comments

Comments
 (0)