If you're like me the problem might be as simple as you're new to jest and are calling the function in the wrong spot....
Ex: It should be
expect(sum(1, 2)).toBe(3)
Not
expect(sum(1, 2).toBe(3))