-
Notifications
You must be signed in to change notification settings - Fork 196
chore: add ci tests #1080
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: add ci tests #1080
Conversation
3d3aa84 to
ccb9ee9
Compare
fbe4eff to
7d7b0cb
Compare
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.
Let's organize the testing structure. Curently there is a first-level /mocks directory and index.test.ts lives among the regular files under /www.
| observerCallback(); | ||
|
|
||
| // should call getPushSubscriptionId | ||
| expect(window.cordova.exec).toHaveBeenCalledWith( |
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.
nit: Should we include this expect for getPushSubscriptionId?
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.
.test. next to files would help identify which files have test or not.
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.
Otherwise youd hvea tests/ folder that looks identical e.g.
tests/
index.test.ts
DebugNamespace.test.ts
InAppMessagesNamespace.test.ts
etc.
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.
Sounds good, I searched testing structures and found this pattern is termed colocating / colocation..
106408f to
9a5d1de
Compare
7d7b0cb to
de1a81f
Compare
Description
One Line Summary
Details
Motivation
Testing
Unit testing
bun run testand got all tests passingAffected code checklist
Checklist
Overview
Testing
Final pass
This change is