Test function. Returns first mockImplementation result. Throws an error if result is not found. See example:
const override = jest .spyOn(console, 'warn') .mockImplementation(log => JSON.parse(`{"prop": '${log}' }`));console.warn('test');const result = getMockResult<{ prop: string }>(override); //result = { prop: 'test' } Copy
const override = jest .spyOn(console, 'warn') .mockImplementation(log => JSON.parse(`{"prop": '${log}' }`));console.warn('test');const result = getMockResult<{ prop: string }>(override); //result = { prop: 'test' }
Generated using TypeDoc
Test function. Returns first mockImplementation result. Throws an error if result is not found. See example: