integration support for harness p3-comments
Signed-off-by: Calvin Lee <cjlee@ualberta.ca>
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ const createReader = (config: JsonObject): UrlReaderPredicateTuple[] => {
|
||||
describe('HarnessUrlReader', () => {
|
||||
const worker = setupServer();
|
||||
setupRequestMockHandlers(worker);
|
||||
|
||||
beforeAll(() => worker.listen({ onUnhandledRequest: 'bypass' }));
|
||||
afterAll(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
@@ -122,7 +122,7 @@ export function getHarnessRequestOptions(config: HarnessIntegrationConfig): {
|
||||
|
||||
if (apiKey) {
|
||||
headers['x-api-key'] = apiKey;
|
||||
} else {
|
||||
} else if (token) {
|
||||
headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user