Mock4JS is a really useful unit testing helper library that allows you to create mocks of your JavaScript classes. What it doesn’t presently support is mocking of objects that you can’t create an instance of yourself using new Class() or of objects that are dynamically created and have functions appended to them. What do I … Continue reading "How to dynamically create a class definition for use with Mock4JS"
↧