ChainSafe / dappeteer

[DEPRECATED]🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Other
491 stars 152 forks source link

Dappeteer 4.0.1 broken dependency #228

Closed Lykhoyda closed 1 year ago

Lykhoyda commented 1 year ago

Describe the bug When we use dappeteer as npm package, import from test folder to src will break because dev dependency is not installed (expected). Therefore importing "export const EXAMPLE_WEBSITE = "http://example.org";" to the src folder from test/ will fail due to uninstalled web3 dependency. As a file will be resolved entirely and not just the export part.

To Reproduce install dappeteer v4.0.1 and call method "initSnapEnv()"

Logs

Cannot find module 'web3' from '../../node_modules/@chainsafe/dappeteer/dist/test/constant.js'

Expected behavior We shouldn't use a test folder when dappeteer is used as a package

System: