Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/api-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
working-directory: ./api-client
run: yarn install

- name: Setting up .environment variables
working-directory: ./api-client
run: cp .env.sample .env

- name: Unit tests
working-directory: ./api-client
run: yarn run test
Expand Down
8 changes: 8 additions & 0 deletions api-client/tests/unit/api/apiClient.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import apiClient from "../../../src/api/apiClient";
import * as dotenv from "dotenv"
dotenv.config()

describe('API Client headers', () => {
it('Should have a content type of application/json', () => {
Expand All @@ -10,3 +12,9 @@ describe('API Client headers', () => {
expect(headers['Accept']).toEqual('application/json')
})
})
describe('API Client options', () => {
it('Should have the base url of ' + process.env.API_BASE_PATH, () => {
let baseURL = apiClient.axiosClient.defaults.baseURL;
expect(baseURL).toEqual(process.env.API_BASE_PATH)
})
})