Unable to mock a typescript module in jest correctly

I have a test I’m trying to run and I want to mock a module using jest.mock. However, I can’t seem to get this one to work, in the example below, the original serializeProduct method is always invoked. I’ve tried spies, I’ve tried mocking the module. When I log out the variables that are the mocks/spies they are indeed mock functions at least so the mocking is happening. It’s just that something is causing it to invoke that original method instead of the mock.

product.serializer.ts

import { ProductDto } from './product.dto';

export function serializeProducts(value: any[]): ProductDto[] {
    return value.map(serializeProduct);
}

export function serializeProduct(value: any) {
    return value;
}

product.serializer.spect.ts in the same folder as the above.

import { expect } from '@jest/globals';
import * as productsSerializer from './products.serializer';

describe('serializer', () => {
    afterEach(() => {
        jest.clearAllMocks();
        jest.restoreAllMocks();
    });

    describe('serializeProducts method', () => {
        it('should foo', () => {
            const packages = [1,2,3,];

            const spy = jest.spyOn(productsSerializer, 'serializeProduct').mockImplementation(() => undefined);

            productsSerializer.serializeProducts(packages);

            expect(spy).toHaveBeenCalledTimes(3);
        });
    });
});

I have also tried module mocking originally like so

jest.mock('./products.serializer', () => ({
  ...jest.requireActual('./products.serializer'),
  serializeProduct: jest.fn()
});

import { expect } from '@jest/globals';
import * as productsSerializer from './products.serializer';

describe('serializer', () => {
    afterEach(() => {
        jest.clearAllMocks();
        jest.restoreAllMocks();
    });

    describe('serializeProducts method', () => {
        it('should foo', () => {
            const packages = [1,2,3,];

            (productsSerializer.serializeProduct as jest.Mock).mockImplementation(() => undefined);

            productsSerializer.serializeProducts(packages);

            expect(productsSerializer.serializeProduct).toHaveBeenCalledTimes(3);
        });
    });
});

I’ve also individually imported the methods in the above example instead of importing * as to no avail.

I’ve got examples of this working in the very same project I’m working on and yet this one doesn’t.