Skip to content

Commit

Permalink
test: adding checks for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kupermind committed Oct 24, 2023
1 parent eeee254 commit 5233a15
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion test/ServiceStaking.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@ describe("ServiceStakingNativeToken", function () {
// The multisig balance before and after unstake must be the same (zero reward)
expect(balanceBefore).to.equal(balanceAfter);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -644,7 +648,7 @@ describe("ServiceStakingNativeToken", function () {
// The multisig balance before and after unstake must be the same (zero reward)
expect(balanceBefore).to.equal(balanceAfter);

// Check the final serviceIds
// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

Expand Down Expand Up @@ -702,6 +706,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter).to.gt(balanceBefore);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -773,6 +781,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter.gt(balanceBefore));

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -823,6 +835,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter).to.gt(balanceBefore);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -877,6 +893,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter).to.gt(balanceBefore);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -968,6 +988,10 @@ describe("ServiceStakingNativeToken", function () {
}
}

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -1037,6 +1061,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter).to.gt(balanceBefore);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -1092,6 +1120,10 @@ describe("ServiceStakingNativeToken", function () {
// The multisig balance before and after unstake must be the same (zero reward)
expect(balanceBefore).to.equal(balanceAfter);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -1135,6 +1167,10 @@ describe("ServiceStakingNativeToken", function () {
// The multisig balance before and after unstake must be the same (zero reward)
expect(balanceBefore).to.equal(balanceAfter);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -1195,6 +1231,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter).to.gt(balanceBefore);

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down Expand Up @@ -1272,6 +1312,10 @@ describe("ServiceStakingNativeToken", function () {
// The balance before and after the unstake call must be different
expect(balanceAfter.gt(balanceBefore));

// Check the final serviceIds set to be empty
const serviceIds = await serviceStaking.getServiceIds();
expect(serviceIds.length).to.equal(0);

// Restore a previous state of blockchain
snapshot.restore();
});
Expand Down

0 comments on commit 5233a15

Please sign in to comment.