You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I can see the reset function, I expect them to reset not only the calls which were recorded, but also the mocked functionality of all the methods.
I expect the following test to pass:
describe('Mock resetting',()=>{it('should reset a value configured to be returned',()=>{// givenconstmyClassMock=mock(MyClass);when(myClassMock.methodB('some string')).thenReturn('other string');constmyClass=instance(myClassMock);reset(myClassMock);// whenconstresult=myClass.methodB('some string');// thenexpect(result).to.not.equal('other string');});});classMyClass{publicmethodB(someArgument:string):string{return`provided value: ${someArgument}`;}}
The text was updated successfully, but these errors were encountered:
michalstocki
changed the title
Why the reset function doesn't reset the mock configuration
Why the reset function doesn't reset the mock configuration?
Feb 1, 2017
michalstocki
added a commit
to michalstocki/ts-mockito-example
that referenced
this issue
Feb 1, 2017
When I can see the
reset
function, I expect them to reset not only the calls which were recorded, but also the mocked functionality of all the methods.I expect the following test to pass:
Here is a link for the test within the configured project:
https://github.com/michalstocki/ts-mockito-example/blob/master/test/spec/extension/resetting/mock-resetting.spec.ts
The text was updated successfully, but these errors were encountered: