-
Notifications
You must be signed in to change notification settings - Fork 668
Refactor: refactor add-slots.js #556
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
Conversation
elem = vm.$createElement(compileToFunctions(slotValue)) | ||
} else { | ||
const compiledResult = compileToFunctions(`<div>${slotValue}{{ }}</div>`) | ||
const _staticRenderFns = vm._renderProxy.$options.staticRenderFns |
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 removed this 'replacing' of staticRenderFns
and didn't experienced unit-test failures - is it ok to remove, or I miss something ?
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 don't think it's OK to remove, but we should add some tests to cover it. Can you write a test to check that a static slot is added correctly.
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.
Thanks @eddyerburgh for information - I'll add appropriate tests for that
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 moved back staticRenderFns
related code in pull request. To be honest I don't know what is static slot - I'm not yet familiar with everything related with Vue.
return Array.isArray(value) ? value : [value] | ||
} | ||
|
||
export function isObject (obj: mixed): boolean %checks { |
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 method is copied from Vue
* Revert "refactor: refactor stub-components.js (#544)" This reverts commit db5e07e. * Revert "refactor: refactor add-slots.js (#556)" This reverts commit ce9e1bf. * delete packages/test-utils/src/shallow.js * add functions * add type SlotValue * add test * fix slotValue * fix validateEnvironment * add test * fix lint * Update slots.spec.js
No description provided.