mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-02-05 09:15:19 -05:00
update test to make or take offer with insufficient funds
This commit is contained in:
parent
0dda005f96
commit
1d50b0027e
@ -1995,7 +1995,7 @@ test("Can go offline while resolving a dispute (CI)", async () => {
|
|||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Cannot make or take offer with insufficient unlocked funds (CI, sanity check)", async () => {
|
test("Cannot make or take offer with insufficient funds (CI, sanity check)", async () => {
|
||||||
let user3: HavenoClient|undefined;
|
let user3: HavenoClient|undefined;
|
||||||
let err: any;
|
let err: any;
|
||||||
try {
|
try {
|
||||||
@ -2011,7 +2011,7 @@ test("Cannot make or take offer with insufficient unlocked funds (CI, sanity che
|
|||||||
await makeOffer({maker: {havenod: user3}, makerPaymentAccountId: paymentAccount.getId(), awaitFundsToMakeOffer: false});
|
await makeOffer({maker: {havenod: user3}, makerPaymentAccountId: paymentAccount.getId(), awaitFundsToMakeOffer: false});
|
||||||
throw new Error("Should have failed making offer with insufficient funds")
|
throw new Error("Should have failed making offer with insufficient funds")
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (!err.message.includes("not enough money")) throw err;
|
if (!err.message.includes("not enough funds")) throw err;
|
||||||
const errTyped = err as HavenoError;
|
const errTyped = err as HavenoError;
|
||||||
assert.equal(errTyped.code, 2);
|
assert.equal(errTyped.code, 2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user