simplify totalDelegated calculation #71
Merged
Annotations
10 errors and 10 warnings
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyMajority.spec.ts#L218
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 3,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"percent": 50,
"type": "majority",
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 54.0541,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "200",
"transfer": "0",
"transferPct": 0,
"winner": true,
},
{
"eliminated": undefined,
- "firstPct": 24.3243,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "90",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 21.6216,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "80",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "370",
- "totalSkyParticipation": "370",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "200",
+ "totalSkyParticipation": "200",
"victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "200",
+ "voter": undefined,
+ },
+ ],
"winner": 1,
"winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyMajority.spec.ts:218:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyMajority.spec.ts#L138
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 3,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"percent": 50,
"type": "majority",
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 37.037,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "100",
"transfer": "0",
"transferPct": 0,
- "winner": false,
+ "winner": true,
},
{
"eliminated": undefined,
- "firstPct": 33.3333,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "90",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 29.6296,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "80",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
+ ],
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "100",
+ "totalSkyParticipation": "100",
+ "victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
],
- "totalSkyActiveParticipation": "270",
- "totalSkyParticipation": "270",
- "victoryConditionMatched": null,
- "winner": null,
- "winningOptionName": "None found",
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "100",
+ "voter": undefined,
+ },
+ ],
+ "winner": 1,
+ "winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyMajority.spec.ts:138:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L691
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 4,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "rank-free",
},
"resultDisplay": "instant-runoff-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "instant-runoff",
},
{
"percent": 50,
"type": "majority",
},
{
"comparator": ">=",
"type": "comparison",
"value": 3000,
},
],
"type": "and",
},
],
},
"results": [
{
"eliminated": false,
- "firstPct": 93.7813,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "3001",
"transfer": "0",
"transferPct": 0,
"winner": true,
},
{
- "eliminated": false,
- "firstPct": 3.125,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "100",
+ "eliminated": undefined,
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
- "eliminated": false,
- "firstPct": 1.5625,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "50",
+ "eliminated": undefined,
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
- "eliminated": false,
- "firstPct": 1.5313,
+ "eliminated": undefined,
+ "firstPct": 0,
"optionId": 4,
"optionName": "Fourth",
- "skySupport": "49",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
"rounds": 1,
- "totalSkyActiveParticipation": "3200",
- "totalSkyParticipation": "3200",
+ "totalSkyActiveParticipation": "3001",
+ "totalSkyParticipation": "3001",
"victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "3001",
+ "voter": undefined,
+ },
+ ],
"winner": 1,
"winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:691:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L596
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 4,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "rank-free",
},
"resultDisplay": "instant-runoff-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "instant-runoff",
},
{
"percent": 50,
"type": "majority",
},
{
"comparator": ">=",
"type": "comparison",
"value": 3000,
},
],
"type": "and",
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 60.2,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "301",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 20,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "100",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 10,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "50",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 9.8,
+ "firstPct": 0,
"optionId": 4,
"optionName": "Fourth",
- "skySupport": "49",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "500",
- "totalSkyParticipation": "500",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "301",
+ "totalSkyParticipation": "301",
"victoryConditionMatched": null,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "301",
+ "voter": undefined,
+ },
+ ],
"winner": null,
"winningOptionName": "None found",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:596:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L464
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 4,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "rank-free",
},
"resultDisplay": "instant-runoff-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "instant-runoff",
},
{
"percent": 50,
"type": "majority",
},
],
"type": "and",
},
{
"type": "default",
"value": 3,
},
],
},
"results": [
{
"eliminated": false,
- "firstPct": 60.2,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "301",
"transfer": "0",
"transferPct": 0,
"winner": true,
},
{
- "eliminated": false,
- "firstPct": 20,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "100",
+ "eliminated": undefined,
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
- "eliminated": false,
- "firstPct": 10,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "50",
+ "eliminated": undefined,
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
- "eliminated": false,
- "firstPct": 9.8,
+ "eliminated": undefined,
+ "firstPct": 0,
"optionId": 4,
"optionName": "Fourth",
- "skySupport": "49",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
"rounds": 1,
- "totalSkyActiveParticipation": "500",
- "totalSkyParticipation": "500",
+ "totalSkyActiveParticipation": "301",
+ "totalSkyParticipation": "301",
"victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "301",
+ "voter": undefined,
+ },
+ ],
"winner": 1,
"winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:464:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L369
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 4,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "rank-free",
},
"resultDisplay": "instant-runoff-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "instant-runoff",
},
{
"percent": 50,
"type": "majority",
},
],
"type": "and",
},
{
"type": "default",
"value": 3,
},
],
},
"results": [
{
- "eliminated": undefined,
- "firstPct": 33.6667,
+ "eliminated": false,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "101",
"transfer": "0",
"transferPct": 0,
- "winner": false,
+ "winner": true,
},
{
"eliminated": undefined,
- "firstPct": 33.3333,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "100",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 16.6667,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "50",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
- "winner": true,
+ "winner": false,
},
{
"eliminated": undefined,
- "firstPct": 16.3333,
+ "firstPct": 0,
"optionId": 4,
"optionName": "Fourth",
- "skySupport": "49",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
+ ],
+ "rounds": 1,
+ "totalSkyActiveParticipation": "101",
+ "totalSkyParticipation": "101",
+ "victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
],
- "totalSkyActiveParticipation": "300",
- "totalSkyParticipation": "300",
- "victoryConditionMatched": 1,
- "winner": 3,
- "winningOptionName": "Reject",
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "101",
+ "voter": undefined,
+ },
+ ],
+ "winner": 1,
+ "winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:369:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L238
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 3,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "approval",
},
{
"percent": 50,
"type": "majority",
},
],
"type": "and",
},
{
"type": "default",
"value": 3,
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 54.0541,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "200",
"transfer": "0",
"transferPct": 0,
"winner": true,
},
{
"eliminated": undefined,
- "firstPct": 24.3243,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "90",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 21.6216,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "80",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "370",
- "totalSkyParticipation": "370",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "200",
+ "totalSkyParticipation": "200",
"victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "200",
+ "voter": undefined,
+ },
+ ],
"winner": 1,
"winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:238:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyCombined.spec.ts#L158
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 3,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"conditions": [
{
"type": "approval",
},
{
"percent": 50,
"type": "majority",
},
],
"type": "and",
},
{
"type": "default",
"value": 3,
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 37.037,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
"skySupport": "100",
"transfer": "0",
"transferPct": 0,
- "winner": false,
+ "winner": true,
},
{
"eliminated": undefined,
- "firstPct": 33.3333,
- "optionId": 2,
- "optionName": "Approve Increase",
- "skySupport": "90",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 29.6296,
- "optionId": 3,
- "optionName": "Reject",
- "skySupport": "80",
+ "firstPct": 0,
+ "optionId": 2,
+ "optionName": "Approve Increase",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
- "winner": true,
+ "winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 3,
+ "optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "270",
- "totalSkyParticipation": "270",
- "victoryConditionMatched": 1,
- "winner": 3,
- "winningOptionName": "Reject",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "100",
+ "totalSkyParticipation": "100",
+ "victoryConditionMatched": 0,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "100",
+ "voter": undefined,
+ },
+ ],
+ "winner": 1,
+ "winningOptionName": "Approve Existing Budget",
}
❯ modules/polling/api/__tests__/fetchTallyCombined.spec.ts:158:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyApproval.spec.ts#L226
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 4,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"type": "approval",
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 98.356,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
- "skySupport": "837.57558",
+ "skySupport": "820.21258",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 98.356,
+ "firstPct": 100,
"optionId": 2,
"optionName": "Approve Increase",
- "skySupport": "837.57558",
+ "skySupport": "820.21258",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 1.644,
- "optionId": 4,
- "optionName": "None of the above",
- "skySupport": "14",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 4,
+ "optionName": "None of the above",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
"optionId": 3,
"optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "851.57558",
- "totalSkyParticipation": "851.57558",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "820.21258",
+ "totalSkyParticipation": "820.21258",
"victoryConditionMatched": null,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 2,
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "820.21258",
+ "voter": undefined,
+ },
+ ],
"winner": null,
"winningOptionName": "None found",
}
❯ modules/polling/api/__tests__/fetchTallyApproval.spec.ts:226:20
|
|
Run pnpm test:ci:
modules/polling/api/__tests__/fetchTallyApproval.spec.ts#L134
AssertionError: expected { parameters: { …(3) }, …(9) } to deeply equal ObjectContaining{…}
- Expected
+ Received
- ObjectContaining {
- "numVoters": 5,
+ {
+ "numVoters": 1,
"parameters": {
"inputFormat": {
"abstain": [
0,
],
"options": [],
"type": "choose-free",
},
"resultDisplay": "approval-breakdown",
"victoryConditions": [
{
"type": "approval",
},
],
},
"results": [
{
"eliminated": undefined,
- "firstPct": 98.3751,
+ "firstPct": 100,
"optionId": 1,
"optionName": "Approve Existing Budget",
- "skySupport": "847.57558",
+ "skySupport": "820.21258",
"transfer": "0",
"transferPct": 0,
- "winner": true,
+ "winner": false,
},
{
"eliminated": undefined,
- "firstPct": 97.2144,
+ "firstPct": 100,
"optionId": 2,
"optionName": "Approve Increase",
- "skySupport": "837.57558",
+ "skySupport": "820.21258",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
- "firstPct": 1.6249,
- "optionId": 4,
- "optionName": "None of the above",
- "skySupport": "14",
+ "firstPct": 0,
+ "optionId": 0,
+ "optionName": "Abstain",
+ "skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
- "optionId": 0,
- "optionName": "Abstain",
+ "optionId": 4,
+ "optionName": "None of the above",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
{
"eliminated": undefined,
"firstPct": 0,
"optionId": 3,
"optionName": "Reject",
"skySupport": "0",
"transfer": "0",
"transferPct": 0,
"winner": false,
},
],
- "totalSkyActiveParticipation": "861.57558",
- "totalSkyParticipation": "861.57558",
- "victoryConditionMatched": 0,
- "winner": 1,
- "winningOptionName": "Approve Existing Budget",
+ "rounds": undefined,
+ "totalSkyActiveParticipation": "820.21258",
+ "totalSkyParticipation": "820.21258",
+ "victoryConditionMatched": null,
+ "votesByAddress": [
+ {
+ "ballot": [
+ 2,
+ 1,
+ ],
+ "blockTimestamp": undefined,
+ "chainId": 42161,
+ "hash": undefined,
+ "pollId": 1,
+ "skySupport": "820.21258",
+ "voter": undefined,
+ },
+ ],
+ "winner": null,
+ "winningOptionName": "None found",
}
❯ modules/polling/api/__tests__/fetchTallyApproval.spec.ts:134:20
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L16
'Area' is defined but never used
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L15
'CartesianGrid' is defined but never used
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L12
'formatValue' is defined but never used
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L11
'MenuItem' is defined but never used
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L9
'useThemeUI' is defined but never used
|
|
Run pnpm lint:
modules/delegates/components/DelegateSKYChart.tsx#L9
'Flex' is defined but never used
|
|
Run pnpm lint:
modules/delegates/api/fetchDelegates.ts#L185
'seed' is defined but never used
|
|
Run pnpm lint:
modules/app/components/layout/layouts/Stack.tsx#L23
Do not use "@ts-ignore" because it alters compilation errors
|
|
Run pnpm lint:
modules/app/api/validateQueryParam.ts#L22
'val' is defined but never used
|
|
Run pnpm lint:
modules/address/components/Jazzicon.tsx#L50
'_rand' is assigned a value but never used
|
Loading