mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix tests
This commit is contained in:
parent
f8ca995f7f
commit
07449ed18d
@ -17,7 +17,7 @@
|
||||
"changelog": "auto-changelog -p",
|
||||
"prepublishOnly": "npm run build",
|
||||
"test:unit": "mocha --config=test/unit/.mocharc.json --node-env=test --exit test/unit/**/*.ts",
|
||||
"test:integration": "mocha --opts test/integration/mocha.opts"
|
||||
"test:integration": "mocha --config=test/integration/.mocharc.json --node-env=test --exit test/integration/**/*.ts"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -6,9 +6,8 @@ import { Config } from '../../src/models/Config'
|
||||
|
||||
const Web3 = require('web3')
|
||||
const web3 = new Web3('http://127.0.0.1:8545')
|
||||
|
||||
const factoryABI = require('../../src/datatokens/FactoryABI.json')
|
||||
const datatokensABI = require('../../src/datatokens/DatatokensABI.json')
|
||||
const factory = require('@oceanprotocol/contracts/artifacts/development/Factory.json')
|
||||
const datatokensTemplate = require('@oceanprotocol/contracts/artifacts/development/DataTokenTemplate.json')
|
||||
|
||||
describe('Simple flow', () => {
|
||||
let owner
|
||||
@ -26,7 +25,12 @@ describe('Simple flow', () => {
|
||||
|
||||
describe('#test', () => {
|
||||
it('Initialize Ocean contracts v3', async () => {
|
||||
contracts = new TestContractHandler(factoryABI, datatokensABI)
|
||||
contracts = new TestContractHandler(
|
||||
factory.abi,
|
||||
datatokensTemplate.abi,
|
||||
datatokensTemplate.bytecode,
|
||||
factory.bytecode
|
||||
)
|
||||
await contracts.getAccounts()
|
||||
owner = contracts.accounts[0]
|
||||
alice = contracts.accounts[1]
|
||||
@ -38,8 +42,8 @@ describe('Simple flow', () => {
|
||||
// Alice creates a Datatoken
|
||||
datatoken = new DataTokens(
|
||||
contracts.factoryAddress,
|
||||
factoryABI,
|
||||
datatokensABI,
|
||||
factory.abi,
|
||||
datatokensTemplate.abi,
|
||||
web3
|
||||
)
|
||||
tokenAddress = await datatoken.create(blob, alice)
|
||||
|
Loading…
x
Reference in New Issue
Block a user