Conversation
|
||
dotenv.config({ path: '.env' }); | ||
import path from "path"; | ||
dotenv.config({ path: path.resolve(__dirname, './.env') }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows tests to read the environment file in correctly.
|
||
describe('MigrationUtils', () => { | ||
describe('getFhirClient', () => { | ||
test('client should be able to authenticate', async () => { | ||
await expect(getFhirClient()).resolves.not.toThrowError(); | ||
await expect(getFhirClient()).resolves.toBeDefined(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not.toThrowError()
wasn't working properly so I updated the code based on this SO
https://stackoverflow.com/questions/65793240/testing-for-an-error-not-being-thrown-by-an-async-function
}, | ||
"dependencies": { | ||
"axios": "0.25.0", | ||
"axios": "0.26.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting this error error: Error: Provided config url is not valid
It was fixed in version 0.26
.
axios/axios#4407
38c5396
to
85c069e
Compare
@@ -3,7 +3,7 @@ | |||
"rushVersion": "5.83.1", | |||
"pnpmVersion": "7.13.0", | |||
"nodeSupportedVersionRange": ">=16.13.0 <17.0.0 || >=18.14.0 <19.0.0", | |||
"ensureConsistentVersions": true, | |||
"ensureConsistentVersions": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows fwoa-tools
to have a different package version of axios
from the other projects in the repo
Issue #, if available:
Description of changes:
Checklist:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.