-
Notifications
You must be signed in to change notification settings - Fork 142
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
Cannot assign to read only property 'constructor' after updating to v3.2.x #271
Comments
Thanks, this was a major component rewrite, so I'm not surprised to see some rough edges. I'll try to fix this ASAP. In the meantime, 3.1.x should work for you |
Could you reproduce this on runkit or a sample app for me? I tried and failed. Here's the runkit url i used: |
My bad, I should have written a better example. I'm using an older version of koa-router (version 7 does not use generators anymore). This is the smallest scenario I can think of: var td = require("testdouble")
var test = {
*method () { return 'ok' }
};
var fakeMethod = td.replace(test, 'method'); (also failing on Runkit) |
Thanks, that'll do it! As you might surmise I didn't consider generators. |
This was fixed in #274 & landed in 3.2.2 |
I'm using
td.replace
to replace methods of a Koa router:The code above works fine with testdouble 3.1.x however after updating to 3.2.1 it breaks with the following error:
Node: v6.10.3
Testdouble: v3.2.1
The text was updated successfully, but these errors were encountered: