These are chat archives for esnext/esnext

May 2016
Douglas Eugene Reisinger II
May 27 2016 14:42

Is it possible to monkey patch a base class with es6 for testing purposes? Say I have a contorller Foo and it extends the class BaseController. I want to swap out BaseController for MockBaseController in my unit tests... thoughts?

I'm pretty sure I can require BaseController first, and reassign it to the mock, and then instantiate Foo, but I'm not positive

Hmm, I guess this isn't the best place for this question, my apologies.