//Super.tsxclass Super extends React.Component { someMethod = () => { }}export { Super };//ClassA.tsximport {Super} from '../Super';class ChildA extends Super { componentDidMount() { this.someMethod(); }}//ClassB.tsximport {Super} from '../Super';class ChildB extends Super { componentDidMount() { this.someMethod(); }}//ClassC.tsximport {Super} from '../Super';class ChildC extends Super { componentDidMount() { this.someMethod(); }}//ClassA.test.tsximport { ClassA } from '../ClassA'describe('ClassA', () => { let wrapper: any; let instance: any; const props = createTestProps({}); beforeEach(() => { wrapper = shallow<ClassA>(<ClassA {...props} />); instance = wrapper.instance() });})
Functionally it is working fine, but when i ran the jest unit test cases i am getting TypeError: Object prototype may only be an Object or null: undefinedat setPrototypeOf () error. Please suggest any solution.Thanks