Skip to content

Commit

Permalink
fix(cart): fix cart test against HARDCODE pricing, great!
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Sep 23, 2024
1 parent 6f69ac6 commit 60c50a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/cart/test/bench.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('benchmarks', () => {
height: undefined,
human: {offer: 'Package up to 20kg'},
maxWeight: 20000,
price: new Decimal(12.95),
price: new Decimal(13.6),
type: 'package',
width: undefined
}],
Expand Down
32 changes: 16 additions & 16 deletions packages/cart/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ describe('Tax calculation', () => {
cart.addItems([
{
sku: 'cr2-blue',
price: new Decimal('12.95'), // Euro
price: new Decimal('13.6'), // Euro
taxType: 'vat_reduced',
weight: 210, // grams
height: 2.20, // cm
Expand Down Expand Up @@ -380,13 +380,13 @@ describe('Tax calculation', () => {
desc: '+ VAT 19%'
},
vat_reduced: {
netPrice: '90.65',
netPrice: '95.2',
rate: '1.07',
desc: '+ VAT 7%'
}
},
totalNet: '131.93',
totalGross: '146.12',
totalNet: '136.48',
totalGross: '150.99',
shipment: {
price: '20.99',
taxType: 'vat_standard',
Expand Down Expand Up @@ -431,20 +431,20 @@ describe('Tax calculation', () => {
assert.deepStrictEqual(JSON.parse(JSON.stringify(r)), {
taxes: {
vat_standard:
{
netPrice: '20.29',
rate: '1',
desc: 'VAT Free'
},
{
netPrice: '20.29',
rate: '1',
desc: 'VAT Free'
},
vat_reduced:
{
netPrice: '90.65',
rate: '1',
desc: 'VAT Free'
}
{
netPrice: '95.2',
rate: '1',
desc: 'VAT Free'
}
},
totalNet: '110.94', // 123,14 - 13,20 for shipping
totalGross: '110.94', // VAT Free
totalNet: '115.49',
totalGross: '115.49', // VAT Free
});
});
});

0 comments on commit 60c50a3

Please sign in to comment.