Closed
Description
Do you want to request a feature or report a bug?
feature
What is the current behavior?
when something is spied upon, you can see invocation arguments, but not what the return value was
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install
and yarn test
.
What is the expected behavior?
something like:
jest.spyOn(window, 'getComputedStyle');
// something
expect(window.getComputedStyle).toHaveReturned(
expect.objectContaining({
overflow: 'hidden',
});
);
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
jest 19
node 8
npm 5