Let\'s suppose I have the following class:
export default class Person { constructor(first, last) { this.first = first; this.last = last
rather than mocking the class you could extend it like this:
class MockedPerson extends Person { sayMyName () { return 'Hello' } } // and then let person = new MockedPerson();