Update to what i believe is our way to do setupMock
This commit is contained in:
parent
6fbe71285b
commit
aefadce025
1 changed files with 13 additions and 5 deletions
|
|
@ -27,13 +27,20 @@ function generateDefaultProps() {
|
|||
buttonLabel: testConstants.content.noInline,
|
||||
altText: testConstants.content.noInline,
|
||||
groupName: 'payment-method',
|
||||
value: testConstants.names.A,
|
||||
buttonImage: testConstants.images.A
|
||||
value: testConstants.names.A
|
||||
};
|
||||
}
|
||||
|
||||
function setupMocks(customMountOptions) {
|
||||
const mountOptions = getMountOptions(customMountOptions);
|
||||
function setupMocks(initialData = {}) {
|
||||
const mountOptions = getMountOptions({
|
||||
router: {
|
||||
navigate: jest.fn()
|
||||
}
|
||||
});
|
||||
|
||||
mountOptions.data = () => (
|
||||
initialData
|
||||
);
|
||||
|
||||
const mockMixin = {
|
||||
methods: {
|
||||
|
|
@ -58,7 +65,8 @@ describe('Payment Method Question', () => {
|
|||
// Arrange
|
||||
const props = generateDefaultProps();
|
||||
const { wrapper } = setupMocks({
|
||||
propsData: props
|
||||
propsData: props,
|
||||
hasImage: true
|
||||
});
|
||||
|
||||
// Act
|
||||
|
|
|
|||
Loading…
Reference in a new issue