Set incoming props as variable names rather than values in test rendering to allow props to be properly passed to component under test
This commit is contained in:
@@ -33,10 +33,13 @@ const WrapperComponent = {
|
||||
name: 'WrapperComponent',
|
||||
components: { checkboxinput },
|
||||
template: testTemplate,
|
||||
props: {
|
||||
initialChecked: Boolean,
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
name: 'testCheck',
|
||||
initialChecked: true
|
||||
initialchecked: this.initialChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +53,7 @@ describe('CheckboxInput Renders Correctly', () => {
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.vm.$children[0].$data.isChecked = true
|
||||
// wrapper.vm.$children[0].$data.isChecked = true
|
||||
|
||||
expect(wrapper.find('.usa-input input').element.checked).toBe(true)
|
||||
})
|
||||
|
Reference in New Issue
Block a user