Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix broken tests, skip slow ones #1221

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading