Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on jest #50

Open
aminlatifi opened this issue Nov 26, 2019 · 1 comment
Open

Error on jest #50

aminlatifi opened this issue Nov 26, 2019 · 1 comment

Comments

@aminlatifi
Copy link

We add Portis support to our Dapp. The below code is how we have imported that:

import Portis from '@portis/web3';

import config from '../configuration';

const PORTIS_DAPP_ID = 'xxxxxxxxxxxxxxx';
const NETWORK_CONFIG = { nodeUrl: config.foreignNodeConnection, nodeId: config.foreignNetworkId };

const portis = new Portis(PORTIS_DAPP_ID, NETWORK_CONFIG);

After adding this, out jest tests fail. The errors are the same on all tests:

 FAIL  src/models/User.test.js
  ● Test suite failed to run

    TypeError: web3_provider_engine_1.default is not a constructor

      at Portis.Object.<anonymous>.Portis._initProvider (node_modules/@portis/web3/lib/index.js:266:22)
      at new Portis (node_modules/@portis/web3/lib/index.js:81:30)
      ....
@aminlatifi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant