Skip to content

Commit bfe264b

Browse files
committed
Add very basic getApiClientWithExternalAuth test
1 parent f9b4185 commit bfe264b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎src/api-client.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,19 @@ test("makeProxyRequestOptions - returns fetch with custom proxy", async (t) => {
292292
);
293293
});
294294

295+
test.serial(
296+
"getApiClientWithExternalAuth constructs clients with or without tokens",
297+
(t) => {
298+
t.notThrows(() => {
299+
api.getApiClientWithExternalAuth(SAMPLE_DOTCOM_API_DETAILS);
300+
api.getApiClientWithExternalAuth({
301+
...SAMPLE_DOTCOM_API_DETAILS,
302+
auth: undefined,
303+
});
304+
});
305+
},
306+
);
307+
295308
test("getAuthorizationHeaderFor - returns undefined if there's no token", (t) => {
296309
const logger = new RecordingLogger();
297310

0 commit comments

Comments
 (0)