Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 9fec7e2

Browse files
committed
fixed taquito tests
1 parent e8a1c07 commit 9fec7e2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages/minter-contracts/test/auction/auction.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,25 @@ describe('test NFT auction', () => {
116116
//TODO: test contents of error message
117117
return expect(failedOpeningBid).rejects.toHaveProperty('errors');
118118
});
119-
test('place bid meeting opening price and then raise it by valid amount by min_raise_percent', async () => {
119+
test('place bid meeting opening price and then raise it by valid amount by min_raise_percent but not min_raise', async () => {
120120
$log.info(`Alice bids 10tz`);
121121
const opBid = await nftAuctionAlice.methods.bid(0).send({ amount : 10 });
122122
await opBid.confirmation();
123123
$log.info(`Bid placed. Amount sent: ${opBid.amount} mutez`);
124124

125125
$log.info(`Eve bids 11tz, a 10% raise of previous bid but less than a 10tz increase`);
126-
const opBid2 = await nftAuctionEve.methods.bid(0).send({ amount : 11 });
127-
await opBid2.confirmation();
128-
$log.info(`Bid placed. Amount sent: ${opBid2.amount} mutez`);
126+
const opBid2 = nftAuctionEve.methods.bid(0).send({ amount : 11 });
127+
return expect(opBid2).rejects.toHaveProperty('message', 'INVALID_BID_AMOUNT');
129128
});
130-
test('place bid meeting opening price and then raise it by valid amount by min_raise', async () => {
129+
test('place bid meeting opening price and then raise it by valid amount by min_raise but not min_raise_percent', async () => {
131130
$log.info(`Alice bids 200tz`);
132131
const opBid = await nftAuctionAlice.methods.bid(0).send({ amount : 200 });
133132
await opBid.confirmation();
134133
$log.info(`Bid placed. Amount sent: ${opBid.amount} mutez`);
135134

136135
$log.info(`Eve bids 210tz, a 10tz increase but less than a 10% raise of previous bid `);
137-
const opBid2 = await nftAuctionEve.methods.bid(0).send({ amount : 210 });
138-
await opBid2.confirmation();
139-
$log.info(`Bid placed. Amount sent: ${opBid2.amount} mutez`);
136+
const opBid2 = nftAuctionEve.methods.bid(0).send({ amount : 210 });
137+
return expect(opBid2).rejects.toHaveProperty('message', 'INVALID_BID_AMOUNT');
140138
});
141139
test('bid too small should fail', async () => {
142140
$log.info(`Alice bids 20tz`);

0 commit comments

Comments
 (0)