Fix uploader test and refactor makeTestWrapper to accept data fn
This commit is contained in:
@@ -16,7 +16,7 @@ to be passed as a prop to checkboxinput at mount time
|
||||
v-bind:initial-checked='initialvalue'
|
||||
>
|
||||
*/
|
||||
const makeTestWrapper = ({ components, templatePath }) => {
|
||||
const makeTestWrapper = ({ components, templatePath, data }) => {
|
||||
const templateString = fs.readFileSync(
|
||||
`js/test_templates/${templatePath}`,
|
||||
'utf-8'
|
||||
@@ -27,11 +27,7 @@ const makeTestWrapper = ({ components, templatePath }) => {
|
||||
components,
|
||||
template: templateString,
|
||||
props: ['initialData'],
|
||||
data: function() {
|
||||
return {
|
||||
initialvalue: this.initialData,
|
||||
}
|
||||
},
|
||||
data,
|
||||
}
|
||||
|
||||
return WrapperComponent
|
||||
|
Reference in New Issue
Block a user