Gabriel Burt

Results 14 comments of Gabriel Burt

> The code change looks safe but we should understand why this is happening before merging the PR. I don't understand why the element would be null in this function...

@charliesantos any more thoughts on this? We continue to have folks hitting this in production. Does my thinking that it's been nulled out without unregistering the onresize handler make sense...

> Hi @gburt , @mikeauclair , > > Can you run `npm install twilio/twilio-video.js#2.24.1-rc1` and verify whether it fixes your build issue? We verified on our end that this works....

@manjeshbhargav did you mean to close this? Was this issue resolved in some other PR/commit?

@dolmen @dlwyatt thanks for the review, I incorporated your feedback

> I question whether using this is actually better than just putting the behaviour in a double which does not use mock.Mock? Two reasons I think: 1. for the many...

One thing that could be nice is if the function could have the same signature as the actual method it's mocking -- and then using reflect we adapt the input...

Like I mentioned in the OP, we could leave `Return` alone and alter `Run` to accept `func(Args) Args` too (or the signature of the actual func being mocked). Or could...

Here's what that looks like -- pretty nice IMO: ![image](https://github.com/stretchr/testify/assets/2048/91b33f5d-e2b2-434c-b53f-150002669cbb)

I've re-implemented this using `Run()` instead of `Return()` and supporting passing in a func that matches the signature of the one being mocked, allowing for this which IMO is quite...