Skip to content

Commit

Permalink
Added missing maxCensusSize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Aug 7, 2023
1 parent 66cdef3 commit cba52f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/integration/election.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ describe('Election integration tests', () => {
maxTotalCost: 0,
});
expect(publishedElection.manuallyEnded).toBeFalsy();
expect(publishedElection.maxCensusSize).toEqual(1);
});
}, 85000);
it('should create an election with addresses census', async () => {
Expand Down Expand Up @@ -202,6 +203,7 @@ describe('Election integration tests', () => {
expect(election.census.size).toEqual(numVotes);
expect(election.census.weight).toEqual(BigInt(numVotes));
expect(election.status).toEqual(ElectionStatus.ONGOING);
expect(election.maxCensusSize).toEqual(numVotes);
})
.then(() =>
Promise.all(
Expand Down Expand Up @@ -285,6 +287,7 @@ describe('Election integration tests', () => {
expect(election.census.size).toEqual(numVotes);
expect(election.census.weight).toEqual(BigInt((numVotes * (numVotes + 1)) / 2));
expect(election.status).toEqual(ElectionStatus.ONGOING);
expect(election.maxCensusSize).toEqual(numVotes);
})
.then(() =>
Promise.all(
Expand Down Expand Up @@ -363,6 +366,7 @@ describe('Election integration tests', () => {
expect(election.census.size).toEqual(numVotes);
expect(election.census.weight).toEqual(BigInt(numVotes));
expect(election.status).toEqual(ElectionStatus.ONGOING);
expect(election.maxCensusSize).toEqual(numVotes);
})
.then(() =>
Promise.all(
Expand Down Expand Up @@ -444,6 +448,7 @@ describe('Election integration tests', () => {
expect(election.census.size).toEqual(numVotes);
expect(election.census.weight).toEqual(BigInt(numVotes));
expect(election.status).toEqual(ElectionStatus.ONGOING);
expect(election.maxCensusSize).toEqual(numVotes);
})
.then(() =>
Promise.all(
Expand Down

0 comments on commit cba52f3

Please sign in to comment.