let createdInstance = null ; export function resetPosthogMock ( ) { createdInstance = null ; } export function getPosthogMockInstance ( ) { return createdInstance ; } export default class Posthog { constructor ( readonly projectApiKey , readonly options ) { if ( createdInstance !== null ) { throw new Error ( 'Instance already created! Consider calling resetMock()' ) ; } createdInstance = this ; } readonly identify = jest . fn ( ) ; readonly capture = jest . fn ( ) ; }