1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/cypress/support/index.js

15 lines
389 B
JavaScript
Raw Normal View History

/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
before(function() {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
})