Vue test utils: mock getter return value

I’m writing a test that mocks the return value of a namespaced getter, which accepts a single argument. The test parameter will be the mocked return value for the getter, which controls the existence of an element on the page.

Mocking the getter with a generic return value allows it to be defined, but so far mocking the return value with the test parameter is not working.

Getter (in the “app” module):

const getters = {
  myGetter:
    (state) =>
    (getterArg) => {
      return state.someStateVariable === true
        ? valueForTrue
        : valueForFalse;
    }
};

Test:

import { cloneDeep } from "lodash";
import { createLocalVue, shallowMount } from "@vue/test-utils";
import MyComponent from "@/views/MyComponent.vue";
import { storeConfig } from "@/store";
import Vuex from "vuex";
   
describe("My test", () => {
  let localVue;
  let store;
  let wrapper;

  beforeEach(() => {
    localVue = createLocalVue();
    localVue.use(Vuex);
  });

  test.each([[false], [true]])(
    "Test param: '%s'",
    (testParam) => {
      store = new Vuex.Store({
        modules: {
          app: {
            namespaced: true,
            ...cloneDeep(storeConfig.modules.app),
            state: {
              ...cloneDeep(storeConfig.modules.app.state),
            getters: {
              ...cloneDeep(storeConfig.modules.app.getters),
              // getter defined, but doesn't include test param
              myGetter: jest.fn().mockReturnValue(jest.fn()) 

              // getter variation with a mocked return value (test fails due to testParam not being returned)
              myGetter: jest.fn().mockReturnValue(jest.fn().mockReturnValue(testParam))

              // getter variation with the argument passed by the component, and a mocked return value (test fails due to testParam not being returned)
              myGetter: jest.fn("getterArg").mockReturnValue(jest.fn().mockReturnValue(testParam))
            }
          }
        }
      });

      wrapper = shallowMount(MyComponent, {
        localVue,
        store
      });

      expect(wrapper.find("#my-element").exists()).toBe(
        testParam
      );

I also tried updating the wrapper after creation:

  // Test fails due to getter being undefined
  Object.defineProperty(wrapper.vm, "app/myGetter", {
    value: () => {
      return testParam;
    }
  });

  // Test fails due to getter being undefined
  Object.defineProperty(wrapper.vm, "app/myGetter", {
    value: ("getterArg") => {
      return testParam;
    }
  });

How can this namespaced getter be configured to dynamically return the test parameter? This question about a getter error during testing is similar (though my getter is defined, it’s just not returning the test parameter value).