-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feature] withKeepUnmounted
decorator
#433
Conversation
Export Size@studiometa/js-toolkit
Unchanged@studiometa/js-toolkit
|
@titouanmathis I need help to improve my tests... They work if they are launched separately but not during the CI... β
|
import { Base, createApp, withKeepUnmounted } from '@studiometa/js-toolkit'; | ||
import { h } from '#test-utils'; | ||
|
||
function initApp( |
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.
suggestion: Return the needed values instead of passing a callback
async function initApp(options?) {
const div = h('div');
// ...
const app = await createApp(App, div);
return { app, div };
}
it('should work', async () => {
const { app } = await initApp();
expect(app.$isMounted).toBe(true);
});
413b3ed
to
a93ce24
Compare
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## develop #433 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 126 127 +1
Lines 4012 4057 +45
=========================================
+ Hits 4012 4057 +45
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. |
This will be addressed more globally by #565, closing for now. |
π Linked issue
#192
β Type of change
π Description
Try in the playground
π Checklist