Skip to content
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/test profile recover #74

Draft
wants to merge 6 commits into
base: proto
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
create stubComponents
Denisfront committed Mar 21, 2022
commit 3e21901477402b2a067f63e12e16e61e75e3b94b
12 changes: 12 additions & 0 deletions tests/unit/__helpers__/stubComponents.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export function stubComponent(Component, options = {}) {
return {
props: Component.props,
model: Component.model,
// Do not render any slots/scoped slots except default
// This differs from VTU behavior which renders all slots
template: '<div><slot></slot></div>',
// allows wrapper.find(Component) to work for stub
$_vueTestUtils_original: Component,
...options
}
}