NagRock / ts-mockito

Mocking library for TypeScript
MIT License
974 stars 93 forks source link

README error? claims that capture() retrieves return value instead of arguments #166

Open cspotcode opened 4 years ago

cspotcode commented 4 years ago

In the README

const foo = { bar: () => 42 };
const spiedFoo = spy(foo);

foo.bar();

console.log(capture(spiedFoo.bar).last()); // [42] 

It seems to imply that capture() can be used to retrieve the return value rather than the arguments, which I'm pretty sure is not correct.