Skip to content

Commit

Permalink
better error msg for off in taxes
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Feb 25, 2024
1 parent 28fc515 commit 8b219c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/grandExchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,12 @@ describe('Grand Exchange', async () => {
total_tax_paid: true
}
});
totalTaxed._sum.total_tax_paid = BigInt(Number(totalTaxed._sum.total_tax_paid!) + 1);
const totalTaxGP = Number(totalTaxed._sum.total_tax_paid!);
expect(totalTaxGP).toEqual(data.taxBank);
expect(totalTaxGP).toEqual(data.totalTax);
const taxDebugStr = `Based on transactions, received ${totalTaxGP} tax
Based on G.E data, we should have received ${data.totalTax} tax`;
expect(totalTaxGP, taxDebugStr).toEqual(data.taxBank);
expect(totalTaxGP, taxDebugStr).toEqual(data.totalTax);
expect(testBank.amount('Coins')).toBeLessThanOrEqual(totalExpectedBank.amount('Coins'));
expect(testBank.amount('Coins') + totalTaxGP).toEqual(totalExpectedBank.amount('Coins'));
expect(testBank.toString()).toEqual(totalExpectedBank.clone().remove('Coins', totalTaxGP).toString());
Expand Down

0 comments on commit 8b219c1

Please sign in to comment.