Argument of type ‘() => { promise: jest.Mock<Promise, []>; }’

  Kiến thức lập trình
    mockPut.mockImplementation(() => {
        return {
            promise: jest.fn(() => Promise.resolve(new Error()))
        };
    });

resolve this error please

error TS2345: Argument of type ‘() => { promise: jest.Mock<Promise, []>; }’ is not assignable to parameter of type ‘(params: PutItemInput, callback?: (err: AWSError, data: PutItemOutput) => void) => Request<PutItemOutput, AWSError>’. Type ‘{ promise: Mock<Promise, []>; }’ is miss

New contributor

Eric Li is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT