We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the current implementation of the library to mock a promise with your special promise you need to
const mockManuallyEdited = createMock<{ promise: Promise<string>; }>(); mockManuallyEdited.promise = new CustomFakePromise(); (mockManuallyEdited.promise as CustomFakePromise<string>).resolve('data');
It would be nice to have the ability to define a mock once and it will be used for that type all the time.
declare function alwaysUseCustomMock<T extends object, U extends T>(factory: () => U): <T2>(cb: (mock: T2) => T) => Extension<T2, U>; // usage alwaysUseCustomMock<Promise<any>, CustomFakePromise<any>>(() => new CustomFakePromise());
The text was updated successfully, but these errors were encountered:
Pmyl
Successfully merging a pull request may close this issue.
With the current implementation of the library to mock a promise with your special promise you need to
It would be nice to have the ability to define a mock once and it will be used for that type all the time.
The text was updated successfully, but these errors were encountered: