Skip to content
New issue

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

cause error when argument don't have a default constructor #119

Open
ianhe8x opened this issue Dec 18, 2018 · 0 comments
Open

cause error when argument don't have a default constructor #119

ianhe8x opened this issue Dec 18, 2018 · 0 comments

Comments

@ianhe8x
Copy link

ianhe8x commented Dec 18, 2018

I mocked a method which is called with a argument don't have a default constructor.
in MethodInvocation's constructor

if (args) {
      this._args = <any>_.cloneDeep(args);
      this._args.length = args.length;
      this._args.callee = args.callee;
}

and then cause my application throw error.

So why cloneDeep the arguments? Is there any workaround in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant