workspaces/demo-app/src/__mocks__/@cogitojs/cogito-ethereum-react.js
import React from 'react'
export class CogitoEthereumReact extends React.Component {
state = {
cogitoWeb3: {},
telepathChannel: {
id: 'telepathId',
key: Uint8Array.from([1, 2, 3]),
appName: 'Cogito Demo App'
},
contractsProxies: {
SimpleStorage: 'SimpleStorageProxy'
},
newChannel: jest.fn()
}
render () {
const { render, children } = this.props
return render ? render(this.state) : children(this.state)
}
}