Correctly include onlyBasic flag in the ts-tests
@@ -57,7 +57,7 @@ describe(`ZkSync integration tests (token: ${token}, transport: ${transport})`,
expect(await tester.syncWallet.isERC20DepositsApproved(token), 'The second deposit should be approved').to.be.true;
}
});
- if (!onlyBasic) {
+
step('should change pubkey onchain', async () => {
await tester.testChangePubKey(alice, token, true);
});
@@ -67,28 +67,43 @@ describe(`ZkSync integration tests (token: ${token}, transport: ${transport})`,
});
step('should execute a transfer to existing account', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testTransfer(alice, chuck, token, TX_AMOUNT);
});
it('should execute a transfer to self', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testTransfer(alice, alice, token, TX_AMOUNT);
});
step('should change pubkey offchain', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testChangePubKey(chuck, token, false);
});
- }
step('should test multi-transfers', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testBatch(alice, bob, token, TX_AMOUNT);
await tester.testIgnoredBatch(alice, bob, token, TX_AMOUNT);
await tester.testRejectedBatch(alice, bob, token, TX_AMOUNT);
});
+
step('should execute a withdrawal', async () => {
await tester.testVerifiedWithdraw(alice, token, TX_AMOUNT);
});
step('should execute a ForcedExit', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testVerifiedForcedExit(alice, bob, token);
});
@@ -98,11 +113,12 @@ describe(`ZkSync integration tests (token: ${token}, transport: ${transport})`,
});
it('should fail trying to send tx with wrong signature', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testWrongSignature(alice, bob, token, TX_AMOUNT);
});
- if (onlyBasic){
- return
- }
+
describe('Full Exit tests', () => {
let carl: Wallet;
@@ -111,10 +127,16 @@ describe(`ZkSync integration tests (token: ${token}, transport: ${transport})`,
});
step('should execute full-exit on random wallet', async () => {
+ if (!onlyBasic) {
+ return;
+ }
await tester.testFullExit(carl, token, 145);
});
step('should fail full-exit with wrong eth-signer', async () => {
+ if (!onlyBasic) {
+ return;
+ }
// make a deposit so that wallet is assigned an accountId
await tester.testDeposit(carl, token, DEPOSIT_AMOUNT, true);
@@ -127,12 +149,18 @@ describe(`ZkSync integration tests (token: ${token}, transport: ${transport})`,
});
step('should execute a normal full-exit', async () => {
+ if (!onlyBasic) {
+ return;
+ }
const [before, after] = await tester.testFullExit(carl, token);
expect(before.eq(0), "Balance before Full Exit must be non-zero").to.be.false;
expect(after.eq(0), "Balance after Full Exit must be zero").to.be.true;
});
step('should execute full-exit on an empty wallet', async () => {
+ if (!onlyBasic) {
+ return;
+ }
const [before, after] = await tester.testFullExit(carl, token);
expect(before.eq(0), "Balance before Full Exit must be zero (we've already withdrawn all the funds)").to.be.true;
expect(after.eq(0), "Balance after Full Exit must be zero").to.be.true;
