diff --git a/package.json b/package.json index c4d37cd53..4a99802fa 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "mocha-light": "mocha --node-env=test --config .mocharc.json --exclude \"./dist/test/integration/compute.test.js\"", "test": "npm run lint && npm run test:unit:cover && npm run test:integration:cover", "test:unit": "npm run build-tests && npm run mocha \"./dist/test/unit/**/*.test.js\"", - "test:integration": "npm run build-tests && npm run mocha \"./dist/test/integration/pricing.test.js\"", + "test:integration": "npm run build-tests && npm run mocha \"./dist/test/integration/**/*.test.js\"", "test:indexer": "npm run build-tests && npm run mocha \"./dist/test/integration/indexer.test.js\"", "test:integration:light": "npm run build-tests && npm run mocha-light \"./dist/test/integration/**/*.test.js\"", "test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit", diff --git a/src/test/integration/pricing.test.ts b/src/test/integration/pricing.test.ts index f2ce7b67a..c1af665b9 100644 --- a/src/test/integration/pricing.test.ts +++ b/src/test/integration/pricing.test.ts @@ -270,35 +270,16 @@ describe('Publish pricing scehmas and assert ddo stats - FRE & Dispenser', () => ) assert(tx, 'Cannot create dispenser') const txReceipt = await tx.wait() - console.log('txReceipt for dipenser: ', JSON.stringify(txReceipt)) const dispenserEvent = getEventFromTx(txReceipt, 'NewDispenser') - console.log('dispenserEvent: ', JSON.stringify(dispenserEvent)) const dispenserAddress = dispenserEvent.topics[0] assert(dispenserAddress, 'Dispenser contract not retrieved') - // const dispenserContract = new ethers.Contract( - // dispenserAddress.toLowerCase(), - // Dispenser.abi, - // publisherAccount - // ) - // const activationTx = await dispenserContract.activate( - // datatokenAddress.toLowerCase(), - // ethers.parseUnits('1', 'ether'), - // ethers.parseUnits('2', 'ether') - // ) - // assert(tx, 'Cannot activate dispenser') - // const activationReceipt = await activationTx.wait() - // const activationEvent = getEventFromTx(activationReceipt, EVENTS.DISPENSER_ACTIVATED) - // assert( - // activationEvent.topics[0] === datatokenAddress, - // 'Datatoken addresses do not match for dispenser event' - // ) + const { ddo } = await waitToIndex( assetDID, EVENTS.DISPENSER_CREATED, DEFAULT_TEST_TIMEOUT, true ) - console.log('stats w dispenser: ', JSON.stringify(ddo.indexedMetadata)) assert(ddo.indexedMetadata.stats) })