Skip to content

Commit

Permalink
test: fix broken tests, skip slow ones
Browse files Browse the repository at this point in the history
  • Loading branch information
adjisb authored and mvanmeerbeck committed Oct 10, 2023
1 parent 45633b6 commit a60b0fb
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions packages/marketplace/test/exchange/Exchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ describe('Exchange.sol', function () {
const {ExchangeContractAsUser} = await loadFixture(deployFixtures);

await expect(ExchangeContractAsUser.matchOrders([])).to.be.revertedWith(
'invalid exchange match'
'invalid exchange match quantities'
);
});

Expand Down Expand Up @@ -3602,7 +3602,7 @@ describe('Exchange.sol', function () {
0,
0
);
const tx = await ExchangeContractAsUser.matchOrders([
await ExchangeContractAsUser.matchOrders([
{
orderLeft: left1,
signatureLeft: await signOrder(left1, maker, OrderValidatorAsAdmin),
Expand All @@ -3617,9 +3617,6 @@ describe('Exchange.sol', function () {
},
]);

const receipt = await tx.wait();
console.log('Gas used for 2 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
// 4 == fees?
expect(await ERC20Contract.balanceOf(maker)).to.be.equal(
Expand Down Expand Up @@ -3692,10 +3689,7 @@ describe('Exchange.sol', function () {
rightOrders.push(rightorder);
}

const tx = await ExchangeContractAsUser.matchOrders(rightOrders);

const receipt = await tx.wait();
console.log('Gas used for 3 tokens: ' + receipt.gasUsed);
await ExchangeContractAsUser.matchOrders(rightOrders);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);

Expand All @@ -3707,7 +3701,8 @@ describe('Exchange.sol', function () {
}
});

it('should be able to buy 20 tokens from different orders in one txs', async function () {
// eslint-disable-next-line mocha/no-skipped-tests
it.skip('@slow should be able to buy 20 tokens from different orders in one txs', async function () {
const {
ExchangeContractAsUser,
OrderValidatorAsAdmin,
Expand Down Expand Up @@ -3785,7 +3780,8 @@ describe('Exchange.sol', function () {
}
});

it('should be able to buy 50 tokens from different orders in one txs', async function () {
// eslint-disable-next-line mocha/no-skipped-tests
it.skip('@slow should be able to buy 50 tokens from different orders in one txs', async function () {
const {
ExchangeContractAsUser,
OrderValidatorAsAdmin,
Expand Down

1 comment on commit a60b0fb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

99.35%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   Exchange.sol95.89%96.88%94.12%95.83%182, 64
   ExchangeCore.sol98.84%96.43%100%100%74
   OrderValidator.sol97.92%95.45%100%100%38
   WhiteList.sol97.62%93.75%100%100%64
packages/marketplace/contracts/exchange/libraries
   LibFill.sol100%100%100%100%
   LibMath.sol100%100%100%100%
packages/marketplace/contracts/interfaces
   IOrderValidator.sol100%100%100%100%
   IRoyaltiesProvider.sol100%100%100%100%
   IWhiteList.sol100%100%100%100%
packages/marketplace/contracts/lib-asset
   LibAsset.sol100%100%100%100%
packages/marketplace/contracts/lib-bp
   BpLibrary.sol100%100%100%100%
packages/marketplace/contracts/lib-order
   LibOrder.sol100%100%100%100%
packages/marketplace/contracts/lib-part
   LibPart.sol100%100%100%100%
packages/marketplace/contracts/royalties
   IERC2981.sol100%100%100%100%
   LibRoyalties2981.sol100%100%100%100%
packages/marketplace/contracts/royalties-registry
   IMultiRoyaltyRecipients.sol100%100%100%100%
   RoyaltiesRegistry.sol96.58%90%100%98.61%166–167, 239, 60
packages/marketplace/contracts/transfer-manager
   TransferExecutor.sol100%100%100%100%
   TransferManager.sol99.11%97.06%100%100%63
packages/marketplace/contracts/transfer-manager/interfaces
   IRoyaltyUGC.sol100%100%100%100%
   ITransferExecutor.sol100%100%100%100%
   ITransferManager.sol100%100%100%100%

Please sign in to comment.