Update to what i believe is our way to do setupMock

This commit is contained in:
Bill Richardson 2024-02-05 14:46:21 -05:00
parent 6fbe71285b
commit aefadce025

View file

@ -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