jest.fn() value must be a mock function or spy jest.fn() value must be a mock function or spy jquery jquery

jest.fn() value must be a mock function or spy


You need to spy on the backButtonActions function, either via jasmine's spyOn method or via Jest's jest.spyOn method

https://facebook.github.io/jest/docs/jest-object.html#jestspyonobject-methodname