-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Testing #1399
chore: Testing #1399
Conversation
@@ -104,7 +104,7 @@ export const activeProfile: Readable<Profile | undefined> = derived( | |||
) | |||
|
|||
activeProfileId.subscribe((profileId) => { | |||
Electron.updateActiveProfile(profileId) | |||
Electron?.updateActiveProfile(profileId) |
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 change exists because it was throwing errors of reading updateActiveProfile
of undefined
.
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.
Looks great! Just two minor things
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.
Looks great!
Description of change
This PR integrates Jest for testing the Typescript files in
packages/shared/lib
, which contains mostly business logic for all platforms of Firefly. This will be important for whenever we would like to add new functionality, refactor existing functionality, etc.I tried integrating Mocha as well, but was not able to successfully setup a mocked DOM environment for testing (despite trying jsdom). For this reason, Jest was chosen as it ships with jsdom making it quite easy to setup.
Changes
firefly-ci.yml
for continuous integration checks (linting will be added later)shared/lib/test
) along with sample test filecurrency.test.ts
shared/lib/test/setup.js
Links to any relevant issues
None
Type of change
How the change has been tested
Tested on:
Change checklist